Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for a file
Message
From
11/10/1998 06:13:00
 
 
To
06/10/1998 06:55:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00144148
Message ID:
00145732
Views:
32
>>I am trying to verify if a file is present on the disk. I have tried FILE() but it also checks along the path and returns true if it finds the file anywhere. If I have a full file name how can I verify that it is present on the disk?
>>
>>Thanks
>John,
>File() is not thrustable all the time. Instead you might try :
handle=fopen(cFilename)
>if handle > 0
>   =fclose(handle)
>   return .t.
>endif
>return ferror()
This would return .t. if file found and accessible otherwise an error code indicating why cannot be opened (ie: exists but not accessible).
>Cetin

The best part about this episode was that I had included the app.ini file in the project but forgot to exclude it. That drove me nuts for awhile as the executable would "find" the file every time it ran but when I looked with explorer it was not there...

Thanks for the help
Previous
Reply
Map
View

Click here to load this message in the networking platform