Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem using if file (¯o)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01047354
Message ID:
01146043
Vues:
14
>Moises,
>be careful with FILE() function. It will returns .T. if file with the same name exists somewhere in VFP path.
>i.e. you have file with name "test.dbf" in folder "c:\test\"
>In VFP put
>
>SET PATH TO c:\test
>? FILE("c:\someotherfoldername\test.dbf") && -> .T.
>
>Thats why I always use SYS(2000)
>
>SET PATH TO c:\test
>? EMPTY(SYS(2000,"c:\someotherfoldername\test.dbf")) && -> .F.
>** or as Naomi suggest use ADIR() function
>
Thanks, I think this is shorter than adir check, so I'm trying this now <g>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform