This will be a short post on how to find files modified after a certain date with PowerShell, something that might come in handy when working with scripts that copies files.
To achieve this we will use the CmdLet “Get-ChildItem”.
To search a single folder use the following line to find files modified after 12/11/15 (Replacing the Path to suit your needs)
Get-ChildItem -Path "C:\Temp" | ? {$_.lastwritetime -gt '12/03/15'}
To search for files in sub folders as well, we need to add “-recurse” to the CmdLet as follows:
Get-ChildItem -Path "C:\Temp" -recurse | ? {$_.lastwritetime -gt '12/03/15'}
Pingback: PowerShell Guides - A guide to Microsoft ProductsA guide to Microsoft Products