I need to create a scheduled task that copies files from a folder A to a Folder B (map drive). In the destination directory I need to retain copied files for only one month (after which it will overwrite the older files). I also want to purge older files in the source directory.
I tried using the following:
xcopy /s c:\Folder1 d:\Folder2
but I'm not sure about the one month retention as I have never played with this before.I know a bit about how to copy the files, but not sure about implementing the one month retention aspect. I have tried using Robocopy for this task as well.
How can I achieve this ?
robocopy
.