Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does the directory exist?
Message
De
23/09/1999 17:39:58
Jonathan Cochran
Alion Science and Technology
Maryland, États-Unis
 
 
À
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:
00268279
Vues:
19
This doesn't work on NT, since the NUL device doesn't exist on NT. This bit us in some software once.

>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform