vbscript that will copy folders to C:\temp and then a script that will copy back to original place

chasmant used Ask the Experts™
I could use some help
I need a script that will copy
C:\Documents and Settings\"current users folder"\Application Data\Microsoft\Outlook
C:\Documents and Settings\"Current users folder"\Application Data\Microsoft\Internet Explorer
C:\Documents and Settings\"Current users folder"\Application Data\Microsoft\Signatures
to the C:\temp folder

then a script that will copy them back and over write the folders that maybe there now after I recreate their profile
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


Windows XP

Can you explain why you want a script to do this?  As chasmant said:

"Windows XP"

You can move/copy/delete profiles manually from the user profiles menu.
I think this should do what you're looking for:
Set WshShell = WScript.CreateObject("WScript.Shell") 
strSrcRoot = WshShell.ExpandEnvironmentStrings("%APPDATA%") & "\Microsoft\"
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim MovFolders(3)

MovFolders(0) = "Outlook"
MovFolders(1) = "Internet Explorer"
MovFolders(2) = "Signatures"

for i = 0 to 2
	srcFolder = strSrcRoot & MovFolders(i)
	TargetFolder = "C:\Temp\" & MovFolders(i)
	FSO.CopyFolder srcFolder, TargetFolder

Open in new window

The "Copy back" version then will just have the srcFolder and TargetFolder assignments swapped:

	TargetFolder = strSrcRoot & MovFolders(i)
	srcFolder = "C:\Temp\" & MovFolders(i)

Open in new window


thanks this worked perfect

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial