I have this script which compares files in two areas of the disk and copies the latest file over the one with the older modified date.
$filestowatch=get-con
Test-Path may give odd answer. E.g. "Test-Path c:\temp\ -PathType leaf" gives false, but "Test-Path c:\temp* -PathType leaf" gives true. Sad :(