Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does the directory exist?
Message
De
23/09/1999 12:13:54
Steven Herbin
SNH Computing Corporation
Swan Lake, New York, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00267693
Message ID:
00268045
Vues:
22
>>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?
>>
>>TIA
>
>adir(laResults, "MyDir.*", "D") will put the results into array laResults. The return value is numeric equal to the number of matches to the mask.


There could be an easier way from the good old days of DOS (remember then?):

if file("c:\xxxx\nul") && where xxxx is your directory name
messagebox("Exists")
else
messagebox("N/G")
endif

You could also test for "prn" or some other things but the above works.
Steven Herbin
SNH Computing Corporation
Swan Lake, NY
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform