Xcopy switch help

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
falcios
Posts: 43
Joined: 02 Mar 2017 05:38

Xcopy switch help

#1 Post by falcios » 09 Apr 2017 07:33

Xcopy seems to be copying all the files within a folder when only a file is created and no other files have changed.

Command line I'm using:
xcopy c:\users\user\test e:\test /s /d /e /y /v

Is there a switch to truly copy only source files that have changed, or a switch that I should remove?

Thanks

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Xcopy switch help

#2 Post by aGerman » 09 Apr 2017 08:25

Rather use ROBOCOPY. It ignores unchanged files by default.

Steffen

Samir
Posts: 384
Joined: 16 Jul 2013 12:00
Location: HSV
Contact:

Re: Xcopy switch help

#3 Post by Samir » 09 Apr 2017 11:38

Check the dates and times on the two systems involved and make sure they are in sync.

Also, what are the two file systems involved? There are some time/date nuances between FAT and NTFS.

igor_andreev
Posts: 16
Joined: 25 Feb 2017 12:55
Location: Russia

Re: Xcopy switch help

#4 Post by igor_andreev » 09 Apr 2017 17:06

falcios wrote:xcopy c:\users\user\test e:\test /s /d /e /y /v

Is there a switch to truly copy only source files that have changed, or a switch that I should remove?

Try changing /d to /m
The first time xcopy copies all files, while the next times, it only copies new or changed files

Samir
Posts: 384
Joined: 16 Jul 2013 12:00
Location: HSV
Contact:

Re: Xcopy switch help

#5 Post by Samir » 10 Apr 2017 12:25

igor_andreev wrote:
falcios wrote:xcopy c:\users\user\test e:\test /s /d /e /y /v

Is there a switch to truly copy only source files that have changed, or a switch that I should remove?

Try changing /d to /m
The first time xcopy copies all files, while the next times, it only copies new or changed files
But the problem with this is that it modifies the attributes of the source files. And it doesn't solve the issue as to why /d isn't working as it should be.

Post Reply