Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Windows XP to Windows 7 user profile move script.

$
0
0

Hey guys I have a huge project that will be all over the country. I have over 1000 machines each with 5 to 10 users in every machine that I need to move data to a server located in Florida.

What am I trying to achieve is a script that will allow me to log into a machine and run the script under my profile as Admin. I would like the script to copy all user data in the machine (hostname) and copy it to a external harddrive.

I haven't written scripts since I was last in school and I got the first part down.

@Echo off
set /P hostname=What is the name of the computer to copy from:

Once the host name is entered then it would copy all the users profiles to the hard drive.

Something like this? (\\%TestHostName%\c$\documents and settings\*) except I don't want everything in the folder just a folders within the documents and settings.

I would like these folders copied.

c:\Documents and Settings\UserName\Desktop\

c:\Documents and Settings\UserName\My Documents\

c:\Documents and Settings\UserName\Favorites\

c:\Documents and Settings\UserName\application data\microsoft\signatures\

c:\Documents and Settings\UserName\application data\microsoft\office\

c:\Documents and Settings\UserName\application data\microsoft\System Certificates

c:\Documents and Settings\UserName\application data\microsoft\Templates\

When I am looking in the hardrive I would like it to make a folder label by the host name.

so I would see e:\TestHostName

then I could see all the users that were copied in from that machine. e:\TestHostName\User1

I had /d /s /y /h /i /z also in the xcopy command list so I can make sure it grabbed everything.

Any help would be appreciated guys. I tried a script earlier and keep running into issues and problems.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>