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
for /F "tokens=*" %i in ('dir /B /A:D') do xcopy "%i\Documents" "D:\newshare\%i\My Documents" /K
/O /X /Y /E /H
this has to be run on the folder where are stored all the users folders (by example D:\Home)
you should test it before.