>>>Hi BB
>>>
>>>That didn't work either. Besides, how would FILE() work if its arguments aren't on the VFP path?
>>>
>>>Thanks
>>>
>>>Terry
>>
>>
>>It works great if you send full path to it.
>
>That's the point. I don't know the path.
>
>>I prefer to use EMPTY(SYS(2000, [.....])) instead of FILE() becuase it return correct values event the file with the same name exists in current path.
>>BTW what do you mean with "it didn't work"?
>>FILE() return .f.?
>
>Well, like you and I say, FILE() works if you send it the whole path, but I can't guarantee where the cursor will end up, and it's not on the VFP path. I don't understand about sys(2000). How will it ever find the file in the vastnaess of the network and local drive, uif no path is provided?
When I search for file I always know where to search it. BTW DBF() always returns full path to dbf. FILE() is dangerous (my oppinion) becuase imagine this situation:
1. You have file named Test.DBF in c:\Test folder
2. Your PATH is SET PATH TO c:\Test
and you check:
IF FILE([C:\SomeOtherFolder\Test.DBF])
ENDIF
I just think, why you test for existance of that cursor. The cursor will be always created if you use SELECT. Not metter if there is some records in it or not:
SELECT * from SomeTable WHERE .f. INTO CURSOR crsTest NOFILTER READWRITE
? _TALLY
? DBF([crsTest])
? FILE(DBF([crsTest]))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.