[windows2000] Re: Sync specific directories from one server to multiple servers :VSMail mx4

  • From: "James LaBorde" <jlaborde@xxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Wed, 8 Feb 2006 10:16:37 -0800

Does anyone know if this is in Windows 2003 Server?  Or would I need to sync to 
a from an XP machine?
 
Thank You,
James

-----Original Message-----
From: windows2000-bounce@xxxxxxxxxxxxx 
[mailto:windows2000-bounce@xxxxxxxxxxxxx]On Behalf Of Ray at home
Sent: Friday, February 03, 2006 6:08 PM
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] Re: Sync specific directories from one server to 
multiple servers :VSMail mx4


I'm a pretty big fan of robocopy, the command line copier that comes with 
Windows XP Pro, I think, (can't remember if it comes with W2K) and is also in 
the W2K Resource Kit, I believe.
 
Sample synchit.bat file:
 
@ECHO OFF
SET SOURCEDIR=%1
SET TARGETDIR=%2
SET LOGPATH=%3

IF {%SOURCEDIR%}=={/?} GOTO :Usage
IF {%SOURCEDIR%}=={} GOTO :Usage
 
IF {%LOGPATH%}=={} (SET LOGPATH=nul)
echo %date% %time%>>%LOGPATH%
robocopy %SOURCEDIR% %TARGETDIR% /NP /XA:S /R:2 /W:3 /MIR /LOG:%LOGPATH% /XD 
"System Volume Information" "Recycler"
echo.>>%LOGPATH%
 
goto :eof
:usage
 
echo.
echo Usage:
echo.
echo synchit "C:\Source\Directory" "C:\Target\Directory" ["C:\Logpath.txt"]
echo.
 
Does that make sense at all?  You should check out the documentation on 
Robocopy to see all the switches.  For example, the /MIR switch means that not 
only will it copy all the files from %SOURCEDIR% to %TARGETDIR%, but it will 
also delete files from %SOURCEDIR% if they don't exist in %TARGETDIR%, because 
the idea here is to mirror the directories.
 
Ray at home
 
 


  _____  

From: windows2000-bounce@xxxxxxxxxxxxx 
[mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of James LaBorde
Sent: Friday, February 03, 2006 6:16 PM
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] Sync specific directories from one server to multiple 
servers


Hello,
 
We had an interesting event happen and are looking at being better prepared for 
it the next time we have a similar problem arise.  As part of this preparation, 
we would like to set up a way to sync two specific directories from our 
production machine to several other machines.  Does anyone know of an utility 
that could do this or perhaps some kind of batch script that could be run to 
accomplish it?
 
Thank You,
James

Other related posts: