MSFN Forum: xcopy help - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

xcopy help Rate Topic: -----

#1 User is offline   b-man 

  • Member
  • PipPip
  • Group: Members
  • Posts: 217
  • Joined: 28-April 09

Posted 14 September 2012 - 06:16 AM

i use xcopy in a cmd file to backup some of my files

heres an example

XCOPY "T:\my user files" "V:\" /D /E /C /R /I /K /Y 
pause
exit



the problem is if i move/delete things in the main folder then i run my xcopy cmd file it recopies the files i have moved and doesnt delete the ones i have deleted is there a way i can set it to mirror or sync that folder?


#2 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,457
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 14 September 2012 - 06:51 AM

View Postb-man, on 14 September 2012 - 06:16 AM, said:

i use xcopy in a cmd file to backup some of my files

heres an example

XCOPY "T:\my user files" "V:\" /D /E /C /R /I /K /Y 
pause
exit



the problem is if i move/delete things in the main folder then i run my xcopy cmd file it recopies the files i have moved and doesnt delete the ones i have deleted is there a way i can set it to mirror or sync that folder?

WHAT is your "main" folder?
WHAT is your destination folder?
WHICH OS is that?

Xcopy is supposed to be eXact COPY, it misses many "sync" functionality.
Robocopy or Strarc:
http://www.ltr-data.se/opencode.html/
may be more suited.

BUT is what you are trying to do that is not clear to me, as XCOPY does have the /U switch:
http://ss64.com/nt/xcopy.html
/U           Copy only files that already exist in destination.

that may :unsure: be what you are after

jaclaz

#3 User is offline   b-man 

  • Member
  • PipPip
  • Group: Members
  • Posts: 217
  • Joined: 28-April 09

Posted 14 September 2012 - 07:12 PM

im running win7

i have a folder on my computer with the files i want to backup, being "T:\my user files", the destination is the "V:\" drive

if i moved or delete a file in T:\my user files and execute the backup to destination drive of V:\ it copies the moved file again but it still leaves it in its old location (in the backup) and if a file is deleted it doesnt delete it from the backup

the /U switch is to only update files in that directory where i want to add new ones aswell and if the files moves it then wouldnt update it anyway..

XCOPY "T:\my user files" "V:\" /D /E /C /R /I /K /Y 
pause
exit


looks like i will have to use one of those other ones you suggested

#4 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,457
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 September 2012 - 03:05 AM

View Postb-man, on 14 September 2012 - 07:12 PM, said:

looks like i will have to use one of those other ones you suggested

Yep.
You may also want to try a "dedicated" sync tool:
http://blinksync.sourceforge.net/

jaclaz

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy