syncing batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
scienceguru1.bat
Posts: 44
Joined: 01 Jan 2011 20:54

syncing batch file

#1 Post by scienceguru1.bat » 24 Apr 2011 20:43

i want to create a batch file that syncs multiple folders, and i don't want to use the copy command, as that could create duplicates or errors (quessing). i also don't want to have to make an extra folder to sync. please help.

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

Re: syncing batch file

#2 Post by aGerman » 25 Apr 2011 05:48

You should have a look at ROBOCOPY.

Regards
aGerman

scienceguru1.bat
Posts: 44
Joined: 01 Jan 2011 20:54

Re: syncing batch file

#3 Post by scienceguru1.bat » 25 Apr 2011 06:09

thanks, it should work

shajanjp
Posts: 5
Joined: 28 Apr 2011 22:33

Re: syncing batch file

#4 Post by shajanjp » 28 Apr 2011 22:51

I think 'CD' command will be helpful to you...
:)

scienceguru1.bat
Posts: 44
Joined: 01 Jan 2011 20:54

Re: syncing batch file

#5 Post by scienceguru1.bat » 29 Apr 2011 13:40

as in:

Code: Select all

Z:
cd "Z:\..."
robocopy "." "C:......" /mir


?????

confused, but thanks for the idea. i think:

[code]@echo off
robocopy "Z:/..." "C:/users........" /mir[\code]

would work much better. aGerman, or other expert, what do you think?

Post Reply