Link to home
Create AccountLog in
Avatar of Luxtech
Luxtech

asked on

scripting a file/folder copy on windows server

Hi

I need help writing a script to copy a bunch of files.  I am trying to relocate users' my documents folders.

currently they are stored in this location:
"\\servername\username\" (each user is shared individually.  all username folders have the same "documents" label because of the desktop.ini file -very confusing)

i would like to move them all to:
"\\servername\sharename\username\my documents\"

so far i have this running as a loggoff script but it isnt ideal:
robocopy "\\servername\%username%" "\\servername\newshare\%username%\My documents" /mir /sec

what would be the best way to move the files directly on the server without using logon/off scripts?  

thanks for help
ASKER CERTIFIED SOLUTION
Avatar of Tasmant
Tasmant
Flag of France image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Luxtech
Luxtech

ASKER

the script worked in my test setup! not sure what all switches do though, but thanks