Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for a file on a drive
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00534547
Message ID:
00534591
Vues:
16
Just an FYI - the FILE() statement caused me problems in my last application update. the file I was checking for was at the root level of a drive (not a subdirectory) and was also in the PATH. under these conditions FILE() always returns .T.

FILE('c:\myfile.txt') will return .T. if mytext.txt is in the path. even if c:\myfile.txt does not exist. a work around was suggested below. since it changes the PATH to nothing, myfile.txt is guaranteed not to be in the PATH.

* lcfile is the file to check for in the root
lcpath = SET('PATH')
SET PATH TO
? FILE()
SET PATH TO (lcpath)


Brenda
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform