VsExternalTools/VsGetLatestChangesInBinaries.ps1


# This script can be added as an external tool to VisualStudio.
# Title: GetLatestChangesInBinaries
# Command: powershell.exe
# Arguments: -nologo -noexit -executionpolicy unrestricted -file "D:\UserData\z0012stm\Documents\WindowsPowerShell\Modules\CmxModule\VsExternalTools\VsGetLatestChangesInBinaries.ps1"
# Use Ouput window: TRUE

Import-Module CmxModule -Force
SetWindowTitle $MyInvocation.MyCommand.Name

$changeCount = 10
$filter = "*.dll"
$targetFolder = "$BinariesFolder\Debug\x64"
Write-Output "Gets the latest changed files in the target folder . . . "
Write-Output "ChangeCount: $changeCount"
Write-Output "TargetFolder: $targetFolder"
Write-Output "Filter: $filter"
$fileInfos = GetLatestChangedFilesInFolder -ChangeCount $changeCount -TargetFolder $targetFolder -Filter $filter
[array]$fileInfos | Foreach-Object  { 
    $_.Name + " - " +
    (GetReadableDateAndTime($_.LastWriteTime)) + " - " +
    (GetReadableTimeSpan($_.TimeSpanString)) + " ago" }