shabbarankers
Technical User
Hi guys,
Im trying to create folders and copy files to a users appdata folder but Im not getting very far. Can someone please put me out of my misery - here is where I have got to
Thanks
Im trying to create folders and copy files to a users appdata folder but Im not getting very far. Can someone please put me out of my misery - here is where I have got to
Code:
Dim objFSO, objWsh, appDataPath, pathToCopyTo, plainTextFile, plainTextFilePath, htmlFile, htmlFilePath
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWsh = CreateObject("WScript.Shell")
appDataPath = objWsh.ExpandEnvironmentStrings("%APPDATA%")
pathToCopyTo = appDataPath & "\Microsoft\Signatures\"
If Not (objFSO.FolderExists(pathToCopyTo)) then
objWsh.Run "cmd /c mkdir %appdata%\Microsoft\Signatures\"
CreateObject("Scripting.FileSystemObject").CopyFile "\\calsbs2008\signature$\SevernSTLogo.jpg", pathToCopyTo
End if
Thanks