Command/Environment/GetLatestChangesInBinaries.ps1


Import-Module CmxModule -Force -DisableNameChecking
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"
Write-Output "IsVsDev: $(IsVsDev)"
$fileInfos = GetLatestChangedFilesInFolder -ChangeCount $changeCount -TargetFolder $targetFolder -Filter $filter
[array]$fileInfos | Foreach-Object  { 
    $_.Name + " - " +
    (GetReadableDateAndTime($_.LastWriteTime)) + " - " +
    (GetReadableTimeSpan($_.TimeSpanString)) + " ago" }

Read-Host "The script has finished. Press any key to exit"