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:
01047611
Vues:
9
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
>The routine below does not work
>Anybody has a clue ?
>
>It looks like I cannot use a macro& withing if file ()
>
>Thanks, Moises
>
>
>dire = getdir ()
>
> cll = dire + "/" + "cl.dbf"
>
> if .not. file(&cll)
>
> = messagebox ("File not found")
>
> endif
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform