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
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