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:
00534630
Vues:
19
Thanks, I will have a close look!

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
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform