Pergunta

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
Foi útil?

Solução

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

/MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top