Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xcopy and don't overwrite if files exists

Status
Not open for further replies.

rmeyerowitz

IS-IT--Management
Feb 15, 2004
4
US
Hi,

I am trying to copy files and if they exist I don't want to overwrite them with xcopy. This is my command
xcopy "c:\Photo Albums\*.*" "K:\Photo Albums\*.*" /s

I know that you add a /Y it will overwrite files without prompting but how do I get it NOT to overwrite files wihtout prompting.
 
Use the resource kit utility ROBOCOPY instead. It is a free download from Microsoft. Not only does it give you the choice to not overwrite a file if it already exists, but it can also do a compare and only replace the file if it is new or modified.


I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top