Login | |
|
 |
RE: CopyFolder Method - 1/30/2006 7:49:38 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
See red additions and comments below. Dim fso sFolder = "\\source" dFolder = "C:\destination" Const OverWriteFiles = True Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.CreateFolder("C:\crystal") objfso.CopyFolder sFolder, dFolder, overwritefiles Wscript.Echo("All Done. Please restart your computer") Red - You were missing. Blue - Why are you creating this if you are not using it? Without checking to see if exists you may get an error when it already exists. Cybex
_____________________________
Common sense is not so common.
|
|
| |
|
|
|
 |
RE: CopyFolder Method - 1/30/2006 7:51:04 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
ebgreen beat me to the punch... Cybex
_____________________________
Common sense is not so common.
|
|
| |
|
|
|
 |
RE: CopyFolder Method - 1/30/2006 8:28:18 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
That may be exactly what you have NOW, but that wasn't what you had. Don't make it sound like what we corrected was wrong. Try echoing your source and destination variables and make sure they are formatted and being passed correctly. Cybex
< Message edited by Cybex -- 1/30/2006 8:30:13 AM >
_____________________________
Common sense is not so common.
|
|
| |
|
|
|
 |
RE: CopyFolder Method - 1/30/2006 8:28:21 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: online
|
Well, my first thing to look at is sFolder = "\\source". The \\ indicates that this is a UNC path and that source is the name of the server. So are you trying to copy an entire server to a folder?
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: CopyFolder Method - 1/30/2006 8:31:07 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
No he is just obscuring the actual path and server names for the post. Cybex
_____________________________
Common sense is not so common.
|
|
| |
|
|
|
 |
RE: CopyFolder Method - 1/30/2006 9:22:11 AM
|
|
 |
|
| |
ebgreen
Posts: 5069
Score: 31
Joined: 7/12/2005
Status: online
|
I know that you think they are correct, but could you please post the output? you can change every letter to x for all I care. Just don't change any of the non-letter characters to something else.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|