Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If a file exists
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00996204
Message ID:
00996509
Vues:
12
>Does anybody know how I can check programmatically if a file exists in a certain location. I have a path and file stored to a variable and i want to check if it exists. For example:
>
>C:\program files\pictures\dress.tif
>
>If this file exists in this location I want to issue a messagebox command.
>
>Any help would be greatly appreciated.

Neil,

FILE() and SYS(2000) DOESN'T work if the file is hidden.

you have to either

?ADIR(aDummy,ADDBS(lcPath)+cFileNameAndExt,"AHRSD",0)>0

OR

?FILE(ADDBS(lcPath)+cFileNameAndExt,1)

AT
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform