Using Robocopy XP010 to sync Files


G

Guest

I want to use Robocopy XP010 on laptops to sync their on line H Drive My
Documents data to their local c:\Documents and Settings\userprofile\My
Documents.

So I wrote a batch file to do this and do a robcopy from H:\My Documents to
the c:\Documents and Settings\userprofile\My Documents folder and this works
fine when laptop users are at work connected to the network.

In the same batch file I have command that does a robocopy from c:\Documents
and Settings\userprofile\My Documents to H:\My Documents for the purpose of
syncing when they take their laptop home are away from the network.

The problem is that when Laptop users add, change delete documents on their
c:\Documents and Settings\userprofile\My Documents folder on their laptop and
then come in to the office and logon to the network the GP Logon script does
the H to C robocopy and of course because I use the /MIR switch the source
being H does see any of the changes that the laptop user made on their local
C drive so it deletes these right off their c:\Documents and
Settings\userprofile\My Documents folder.

Big problem !!

I tried taking off the /MIR but then the syncing or mirroring of the
directory doesn't work.

Is there a solution ????

Here is my batch file


Peter Birkle

Echo ******** Synchronising My Documents Data ********
Echo:
Echo:


:: Copy documents from user's H:\My Documents to users C:\Documents and
Settings\userprofile\My Documents

:: Description of the following switches
:: ======================================
:: /MIR = MIrror directory tree from source to destination
:: /SEC Keep NTFS security permissions on destination the same as the source
:: /R:1 Number of retries on failed copies
:: /W:1 Wait time between retries in seconds. (Default is 30 seconds)
:: /NP Dont dispaly percent copied
:: /log All output to the log file and not to the screen

robocopy "h:\My Documents" "c:\Documents and Settings\%username%\My
Documents" *.* /S /E /MIR /SEC /R:1 /W:1 /NP /X /V
/log:%computername%_replHtoC.txt


:: Copy documents from user's C:\Documents and Settings\userprofile\My
Documents to H:\My Documents
:: This is a reverse copy so that if a user wanted to work offline eg laptop
user or desktop user then
:: Their documents from their local C drive would by synced back to the
h:\My Documents directory.

robocopy "c:\Documents and Settings\%username%\My Documents" "h:\My
Documents" *.* /S /E /MIR /SEC /R:1 /W:1 /NP /X /V
/log:%computername%_replHtoC.txt
 
Ad

Advertisements

H

Hans-Georg Michna

Peter,

have a look at http://winhlp.com/wxsync.htm . However, if I
understand you correctly, you want to sync two folder trees
after changes have been made on both sides since the last
synchronization, Lotus Notes replication style.

The simple answer is that Robocopy cannot do that at all.

You have to look for a synchronizing tool that can do this. I
once made one, called Replicator and still available at
http://www.michna.com/software.htm , but it is no longer
supported. You can still use it, but you may also be able to
find another one somewhere on the web. There are some, but I
don't remember their names or addresses.

Hans-Georg
 
G

Guest

Thankyou for replying, I haven't had much feedback on my question.

Basically all I want is for a laptop user to have their home drive (H)
synced from
the Network to their C Drive during the day at Log on and log off and when a
laptop user goes home they will use their Offline My Documents on their C
drive to work on while they are not attached to the network and when they
arrive back in the office then their offline copy will sync to the on-line
copy on their Network H drive.

Its the same functionality as Offline folders. Its a shame offline folders
is so buggy it would be a good tool but it has too many issues.

I mean the ultimate solution really for us is to have users come in via a
VPN connection but unfortunately our Network people can't get the VPN working
and they are still working on this so for now I have to come up with a
interim solution.

Peter Birkle
 
Ad

Advertisements

H

Hans-Georg Michna

Basically all I want is for a laptop user to have their home drive (H)
synced from
the Network to their C Drive during the day at Log on and log off and when a
laptop user goes home they will use their Offline My Documents on their C
drive to work on while they are not attached to the network and when they
arrive back in the office then their offline copy will sync to the on-line
copy on their Network H drive.

Peter,

in that case http://winhlp.com/wxsync.htm should have the
solution, as long as you always sync in one direction only.

For this I use Robocopy as well, and it has worked excellently
for years.

The only few risks are that you make a mistake and sync in the
wrong direction or that you interrupt the sync process.

Hans-Georg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top