Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: xcopy ignoring same name files?  (Read 2547 times)

0 Members and 1 Guest are viewing this topic.

petezh193

  • Guest
xcopy ignoring same name files?
« on: January 22, 2008, 01:19:26 AM »
i'm trying to move files from one folder to another. however the distination folder share the same files (updated) and as such same filenames as some i'm trying to move

i want all files moved across, except those that share a name, these can be ignored. i can only find help which will move the files and OVERWRITE the same name files, not IGNORE them
ie /y and /-y

and help would be gratefully recieved  ;D

fyi using Windows 2k, writing using notepad, running as a .bat file


i have just found the /u command which only moves same name files....looking for the opposite of this!
« Last Edit: January 22, 2008, 01:30:59 AM by petezh193 »

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: xcopy ignoring same name files?
« Reply #1 on: January 23, 2008, 03:41:33 PM »
I usually use the XCOPY /s/d/y switch combination to replicate ( only new files or edited files ) The newest Date/Time Stamped Files and only new files that dont already exist will copy over to the destination.

This command will replac ethe same file name at the destination if there is a file there of an older date/time stamp. If the date/time stamps are the same it will not touch the same file name file.

You can also add a safety net routine to backup files to be replaced in a archive folder, so that you can fall back on the prior file if needed vs having it stomped out via the newest date/time stamp of a same filename and extenstion file.

Hope this helps.

By XCOPY/? you can see the help with all commands...