Question : VBscript UserName variable Folder Copy

I need to copy a folder from an old profile path to the users current profile.
EX. \\server\share old\%username%.domain\folder to \\server\share new\%username%.domain\folder
I have the code to do the folder copy and to get the username but how do I input the variable into the unc path?

Thanks

Answer : VBscript UserName variable Folder Copy

Just concatenate the needed strings, so something like:

Set objNetwork = CreateObject("WScript.Network")
strUserName = objNetwork.UserName
strFrom =  "\\server\share old\" & strUserName & ".domain\folder"
strTo = "\\server\share new\" & strUserName & ".domain\folder"

~bp
Random Solutions  
 
programming4us programming4us