'Powershell compare files in 2 locations and return files with a newer timestamp
I want to compare two directories $source and $destination and find any files that are in both but have a later timestamp in $destination. Including files in any subdirectories.
I found this but that returns me files that are newer in the source as well.(I changed the SideIndicator from '=>' to '<=' for my test but still no luck.
I only want the files that are more recent in the destination. e.g for these 2 source and dest dirs I would want returned Charles.txt and Ernie.txt.
Can it be done with Compare-Object somehow?
Many thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


