We are about to kick off a big project moving about 200 users between domains, the users will be moved onto a new domain, with a new format of username and a new computer.
I want to use a VB script to move, Desktop & Favorites & My Documents from within Documents and Settings.
Ideally, one vb script on the old computer to be run when logged onto a admin, that will prompt for the username, then move the three above folders to a network share, then prompt when finished.
Then the user logs onto the new computer and off, so that a admin can log on and...
Then another vb script to prompt for the old username and the new username, and then move the three folders back onto the NEW computer and prompt when complete...
I have a little bit of code before, but am not a code guru... please help!
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = CreateObject("WScript.Shell")
RootSource = "D:\Audio\"
RootDestination = "\\some computer name\audio\"
strfolder = InputBox("Please Input folder name:", "Your vbs")
If not objFSO.FolderExists(RootDestination & strfolder) Then
objFSO.CreateFolder(RootDestination & strfolder)
strcmd = "xcopy """ & RootSource & strfolder & "\*.*"" """ & RootDestination & strfolder & """ /S /Y /E "
strCommand = WshShell.Run(strcmd, 0, True)
Set objFSO = nothing
Set WshShell = nothing