Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If a file exists
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00996204
Message ID:
00996509
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform