Question

I have a current .BAT file that is functional but I need to be more specific with it. Currently, it will only copy over files that do not exist. What I am wanting to do is to only look back ONE day and copy those files. I have posted my file information below. Thank you in advance for the assistance.

XCOPY /y "w:\EFileRequests\*.xml" "\\DIS2\EFilingXML\Archive\"/D
Was it helpful?

Solution

Use robocopy, it has a parameter for exactly what you want.

/MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top