PowerShell to List Top X Most Recently Changed Files

Sometimes, you just want to know what programs or source code was most recently changed. The excludes below were set up to work with BizTalk source directories. I was only wanting to see files changed by a person, so change the -Exclude list as needed. cls $sourceCodeDirectory = "D:\Source" $numberOfFilesToRetrieve = 50 $latestFiles = (Get-ChildItem […]

PowerShell: Find files within x seconds of each other, possible duplicates

This PowerShell script finds two files last-updated (or created) within x seconds of each other. You can specify the max difference in time with the variable “$maxDifferenceInSeconds”. With a few changes you could make this program work with minutes, hours or days. In our scenarios, we receive files from a vendor or another application. Sometimes, […]