Saturday, 28 September 2013

xcopy files recently moved to a folder, but not otherwise modified

xcopy files recently moved to a folder, but not otherwise modified

I have users uploading images into a folder. Sometimes the modified date
is not recent at all.
When these images are created in the upload folder their creation date is
a recent date however.
I need to copy all the files newly uploaded to another folder. Which is a
temporary staging folder.
Images are deleted after about 20 minutes, but I do want an overwrite if
that hasn't happened yet, thus the /Y
It seems the modified date is what is looked at with the /D switch
Any ideas how to get around this? I would like to copy based upon creation
date in the upload folder rather than modified date. Is that possible?
I am setting the date to a couple days before the current date, and xcopy
works fine otherwise
xcopy "C:\Client Upload\images\*.jpg" C:\TempBackup /D:%date% /Y

No comments:

Post a Comment