Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directory() Function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00628144
Message ID:
00628147
Vues:
16
This is out of the Hacker's Guide to VFP. Sorry, the most current version I have is 5.0:

If no directory is specified, in addition to the current directory, FoxPro also searches the FoxPro PATH (not the DOS path) set with the SET PATH statement, and returns .T. if the file is found anywhere along that path. It can be argued that "It's a feature, not a bug," as we might in the section by that name, but this one trips us up often. To specify that FILE() only search the current directory, you must explicitly specify at least the directory path name, starting at the root of the drive. So you'll probably want to type this command as FILE( CURDIR() + cFileName) in most cases.

Hope this helps.



>When I use the DIRECTORY() function to check the existence of a DIRECTORY (so I'll know whether or not to create it), the results are not dependable. Any documentation on errors with this function? If not, what else can I use to check the existence of a directory?
>TIA, Shuli
Brian McCord
President
Sagacity Systems
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform