jfholloway
asked on
Robocopy switches to purge based on timestamp
I am trying to create a Robocopy script that will copy files from one location to another location and purge the source files based on the timestamp. The script runs every hour at :00 and it copies the files to another location but, I want it to only delete the source files that are older than 15 minutes prior to the top of the hour. For example, the script runs at 11pm and I want it to only delete files older than 10:45pm. This is what I have currently in my script but, I don't know what switch(es) to use to do the file delete based on timestamp.
robocopy "\\10.11.20.10\Share\CX" "D:\FC_Import\CXM" /S /E /SEC /MOV /COPYALL /V /NP /LOG+:"d:\Robocopy.txt" /R:3 /W:5
robocopy "\\10.11.20.10\Share\CX" "D:\FC_Import\CXM" /S /E /SEC /MOV /COPYALL /V /NP /LOG+:"d:\Robocopy.txt" /R:3 /W:5
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER