Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recognize Server Path
Message
De
14/02/1999 19:10:56
 
 
À
14/02/1999 16:48:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00187557
Message ID:
00187563
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform