I need a batch file that will copy text files that are generated daily and dropped into the E:\BAP Reports\Director Reports folder to our P:. Since nothing ever gets deleted from the Director Reports folder, I need a script that will copy ONLY the newest text files daily. Please help!
Robocopy "E:\BAP Reports\Director Reports folder" "P:." /E /XO /L Test with above. Make sure you include the /L part. This will test the command out and not do anything beside list files and a RoboCopy report.
The gist of the command is to copy only new files. /E Allows coping in all sub folders of the director folder, if there are any, you didn't say.
You also didn't say what the destination folder is P is pretty vague. The reason I mention this is because RoboCopy copies NTFS permissions to, which is an important aspect in Windows File security and to organizations.
reference on RoboCopy should be used if you run into issues,
InDepth More then Anybody would want to know http://theether.net/download/Microsoft/Utilities/robocopy.pdf
Short Laymen Reference http://ss64.com/nt/robocopy.html But AGAIN if you use /L and test before executing you should be fine.
Also try the /Z And /ZB if you run problems.