Looking for a quick way to get the oldest file in a directory? Here is a quick and dirty method to do it with PowerShell…
dir f:\archive -recurse| ?{!($_.PSIsContainer)} | sort -property lastwritetime | select -first 1
The ?{!($_.PSIsContainer)} filter will leave sub-directories out of the search.