Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check whether a file exitsts
Message
From
11/07/2016 12:49:34
 
 
To
09/07/2016 02:49:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01638153
Message ID:
01638223
Views:
70
>>>How do I check whether the file c:\colinfile.xls exists
>>
>>Got it
>>
>>If file()
>
>For your information, file() doesn't always respect the folder you specify. If a file with the given name is in your current path, file() may return true, although you specify another folder. Adir() is a much better choice.

Aside from the path, there's also the bit about files that are included into the project (i.e. built into APP/EXE/DLL) always exist -- regardless of the folder you specify for it as parameter to FILE() function -- so in this case ADIR() is what you'll need to use to get the correct result.
Previous
Reply
Map
View

Click here to load this message in the networking platform