Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does the directory exist?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00267693
Message ID:
00269293
Vues:
20
>I'm having touble figuring out how to determine if a directory exists. I've tried FILE(fullpath) and FILE(fullpath\.) etc...
>
>Any easy way?

There are two easy approaches that I use; either ADIR(aRandomArray,"directory name",'D') > 0 and "D" $ aRandomArray[1,5] (some problems with name formation in network environments) or use FCREATE() to try creating a file in the directory - it will fail if the directory doesn't exist, but also will fail if the user doesn't have the necessary privileges to write/create in the dirctory.
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