Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verifying the existence of a file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00547744
Message ID:
00547827
Views:
25
The simplest and most reliable method I have encountered is
return not empty(sys(2000,tcFile))
This function will RELIABLY check for the presence of the file string in tcFile, It does not create arrays, and does not require any further searching thru the array. If the file is found on the drive/directory as specified in tcFile sys(2000) will return the name of the file, if it is not found sys(2000) will return '', therefore if the file is found this function will return True else False.



>Hi all
>
>I'd like to know how I can get my application to verify the existence of a particular file on the A: drive - if the file is present - then I want the application to run. If not, I'd like to stop the app from running.
>
>Thanks in advance.
>
>Chris Kable
>FUELtrac
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform