Need VBS help: Copying a Folder from a Network Share to the C: Drive.
Our Scripting person left the company last month and has been replaced by a scripting noob (me). I am total beginner at this. A took a course a year ago, understood little, and that's about all my vbs experience until now...
My former colleague wrote the script but for some reason it doesn't work (nothing happens). Its supposed to have worked before, I am at a loss to explain why it doesn't now.
The object of the script is very basic. Copy a folder named "ebuns" from a network share and place it in the local directory "c:\Applications\ebuns". The EBUNS folder is about 450MB.
I ran it through a editor (VBSEDIT), and it came back with no errors so I am confused as to why it doesn't work. To my noob eye it looks OK but does anything look off to any of you?
Note: Anything with a xxx was removed by me for confidentiality reasons.
Dim objFSO, objFolder, strDirectory1, strFileName, strSourcePath, strDestPath
strDirectory1 = "C:\Applications\eBuns"
Const DeleteReadOnly = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
strDestPath = "C:\Applications\eBuns"
If objFSO.FolderExists(strDirectory1) Then
objFSO.CopyFile (strSourcePath), (strDestPath)
If any of you VBS gurus could help a colleague I'd sure appreciate it. (and yes Ill get some more practice after this)