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