Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If a file exists
Message
From
16/03/2005 15:01:08
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00996204
Message ID:
00996489
Views:
19
A reliable and simple solution is:
if not empty(sys(2000,'C:\program files\pictures\dress.tif')
    ? 'File Exists'
else
    ? 'File is not here!'
endif
Glenn

>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform