Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recognize Server Path
Message
From
14/02/1999 19:10:56
 
 
To
14/02/1999 16:48:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00187557
Message ID:
00187563
Views:
21
>How can I get the "Windows Script Host" or " WSH" to recognize server path?
>
>cSource = 'C:\Test1'
>cDestination = '\\Sever\test2'
>IF DIRECTORY(cSource)
> FSO = CreateObject("Scripting.FileSystemObject")
> FSO.CopyFolder(cSource, cDestination)
>ELSE
> MESSAGEBOX("Directory "+cSource+" does not exist.")
>ENDIF
>

If you're trying to create Test2 on \\Sever, you can't do it that way - a UNC path is in the form \\servername\sharename\remainder of path. The FileSystemObject can't create a new share, only a folder beneath an existing share.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform