Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with the File Command
Message
 
 
To
28/01/2002 04:35:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00611357
Message ID:
00611460
Views:
23
As I sad, it'll return .t. if 'data.dbf' exists antyhere along VFP search path. You can use ADIR() function instead.
PROCEDURE IsFileFound
LOCAL laTemp	
 IF ADIR(laTemp, This.cFileName) > 0
	messagebox ( 'Found')
 ELSE
        messagebox ('Not Found')
 ENDIF
ENDPROC
>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
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform