Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with the File Command
Message
From
28/01/2002 04:54:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/01/2002 04:35:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00611357
Message ID:
00611402
Views:
27
>DEFINE CLASS TestFile as custom
>
>cFileName =''
>
> PROCEDURE IsFileFound
>
> IF FILE(This.cFileName) = .T.
> messagebox ( 'Found')
> ELSE
> messagebox ('Not Found')
> ENDIF
>
>
>ENDPROC
>
>oFile = CREATEOBJECT('testfile')
>oFile.cFileName = 'A:\data.dbf'
>oFile.isFileFound

Nicholas,
File is not trustable everytime. Especially when it's a removable or network device and device not ready, file you serach exists in your search path you get .t.
Use adir() instead.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform