Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using FSO CopyFolder, Get Path Not Found 1

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hi VBScript people,

I get a 'Path not found' error at the CopyFolder statement

Dim oFSO

Set oFSO = CreateObject("Scripting.FileSystemObject")

'-- path error is here.....
oFSO.CopyFolder "\\GM\C$\sys\Common\Scanned\to_be_added_to_website_TEST", "\\Yukon\C$\

Thanks for any help.
John
 
thanks PHV,

I didn't see anything in the MS article that helps me with this problem specifically.

I have tried ...to_be_added_to_website_TEST\*" and have even deleted the destination folder to let it create it.
Tried it most every way.

I DID get this to work on my PC's local drive:

oFSO.CopyFolder "C:\Test1", "C:\Test2"

but can't seem to get anything to work when using the "\\serverName.." convention. I can browse the source and destination folders so it doesn't appear to be a permissions issue.

Can anyone help me?
John


 
[1] Check these folders really exist.
[tt] wscript.echo oFSO.folderexists("\\GM\C$\sys\Common\Scanned\to_be_added_to_website_TEST")
wscript.echo oFSO.folderexists("\\Yukon\C$\www.gmcoop.com$")[/tt]
[2] Then also add the overwrite param to true.
[tt] oFSO.CopyFolder "\\GM\C$\sys\Common\Scanned\to_be_added_to_website_TEST", "\\Yukon\C$\ true[/tt]
[3] Make sure there is no ads_TEST as a file, else you may have to add a trailing backslash.
[4] Make sure ads_TEST is not readonly.
 
well... a very big OOPS !

My mistake. I thought was a share so I appended the $ to the path.

This works, when the destination folder already exists:

oFSO.CopyFolder "\\GM\C$\sys\Common\Scanned\to_be_added_to_website_TEST", "\\Yukon\C$\ true

We can close this one out.

Thanks for your help !
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top