Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in windows 2003 server we have built in option to SYNC my documents, desktop, application data ... folders from client computers to server.

i am looking for some login script to to SYNC one special folder/Folders from Client computer to Server.


share|improve this question

migrated from Feb 19 '10 at 11:33

This question came from our site for computer enthusiasts and power users.

Are you looking to just sync that folder at login? or did you want it to live sync throughout the day? – Jason Aug 28 '12 at 18:09

You might want to try using the resource kit command Robocopy, which will sync two directories via the command line, so can be used in a login script. Eg

robocopy.exe "c:\client_directory" "f:\server_directory" /mir 
share|improve this answer

the "sync" you are referring to, is called "roaming profiles".

A simple script implementation is described below that may copy something and log it.

Modify the following to your needs (very basic)

REM: Login Script for XYZ
XCOPY /Y /E %SYSTEMROOT%\SourceFolder \\myfileserver\hiddenshare$\%USERNAME%\DestFolder
echo %DATE%-%TIME%-%USERNAME% Copied SourceFolder from %COMPUTERNAME% to Server >> \\myfileserver\hiddenshare$\log.txt

Then save it somewhere like here: \MyDomain\NETLOGON\logon.bat

The "login script" can be applied via group policy, ie, create a new policy applied to your staff's OU

User Configuration -> Windows Settings -> Scripts -> Logon 

Or, if you just need it for a few, (and you saved it in the NETLOGON folder above) simply edit the user account (Profile Tab -> Logon Script textbox) and enter the filename.

share|improve this answer

with w2k+ client side cache is another option to sync files, but once again I think its limited to desktop,appdata,mydocs and dang can't remember the other. Synctoys from ms will work quiet nicely for what your doing also!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.