I use XCOPY /D option but it copies all the files with the NEWER and with the SAME (!!!) date.
Description for option says: copies only those files whose source time is newer than the destination time
How can I copy only with NEWER date but not the SAME?
Situation ... I make backup files every day and name it after weekdays so I have every 7 days the same filename. After I make backup I want to copy to second location only file from today which is newer than in second location. But XCOPY /D always copy ALL the files, with the newer date and with the same date, in other words the same files, I copy 6 same files and only 1 newer. Logically I would like to copy only 1 newer file.
Copy ONLY newer files
Moderator: DosItHelp
Re: Copy ONLY newer files
If your system date format is m-d-y simple use xcopy /d:%date%
or xcopy /d:%date:/=-% if divider is /
or xcopy /d:%date:/=-% if divider is /
Re: Copy ONLY newer files
Thanky you for you reply.
I realized that this problem only occur when I copy to NAS. On local disks or USB stick everything is OK, only newer files are copied.
Does anybody knows what is the problem?
I realized that this problem only occur when I copy to NAS. On local disks or USB stick everything is OK, only newer files are copied.
Does anybody knows what is the problem?