I'm a new PowerShell scripter, trying to get some experience by writing a few scripts that aren't too hard, and might be useful in the process.
What I'm trying to do is get the script to copy files between two directories, based on their last write times. If the file in the source folder has been edited since the last back-up, the script will copy the file.
I've thought about using the Compare-Item cmdlet to compare the last write times of all files in the directories. This will obviously list all the files with different last write times. Then using this information, and file names, it would copy to the destination path. I just can't work out the right way to write this down, or if using last write time will even work.
Any help would be awesome, because I'd rather not cheat and use xcopy. Thanks in advance