Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check, if a Directory exist?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00016354
Message ID:
00016355
Vues:
55
>Any one know how to check if a directory exist in VFP5.0. The API of windows 95 must have a function call to do this.
>
>I like to sub-classe the function.

I use for this simple function called CheckDir
lparameter lcDirToFind
local lnIsDir
lnisDir=aDir(awhat,lcDirToFind,"D")
return lnIsDir
so you can use code like this:
if CheckDir("data\myfilesdir")=0
  * do something if directory exists...
else
  * do something if directory does not exist...
endif
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform