Page 1 of 1

How does File() work?

Posted: Mon Aug 28, 2006 6:29 pm
by dutch
Dear All,

I try to check database file is exist or not buy use file() but I don't know how to success.

- File( "TEST.DBF" ) is not working
- File( CURDIR()+"\TEST.DBF" ) is not working
- File( "\\"+CURDIR()+"\TEST.DBF" ) is not working

Thank you for any idea.

Best regards,
Dutch

Re: How does File() work?

Posted: Mon Aug 28, 2006 6:49 pm
by Richard Chidiak
dutch wrote:Dear All,

I try to check database file is exist or not buy use file() but I don't know how to success.

- File( "TEST.DBF" ) is not working
- File( CURDIR()+"\TEST.DBF" ) is not working
- File( ""+CURDIR()+"\TEST.DBF" ) is not working

Thank you for any idea.

Best regards,
Dutch


Dutch

FILE(CURDIR() + "\TEST.DBF") IS THE CORRECT SYNTAX.

Richard

Posted: Mon Aug 28, 2006 6:54 pm
by dutch
Dear Richard,

I try this FILE(CURDIR()+"\TEST.DBF") on my SD card in PPC but it return .F.

CURDIR()+"\TEST.DBF" = "Storage Card\TEST.DBF"

It doesn't work.

Best regards,
Dutch

Posted: Mon Aug 28, 2006 8:21 pm
by Richard Chidiak
dutch wrote:Dear Richard,

I try this FILE(CURDIR()+"\TEST.DBF") on my SD card in PPC but it return .F.

CURDIR()+"\TEST.DBF" = "Storage Card\TEST.DBF"

It doesn't work.

Best regards,
Dutch


It works with my ppc app. i use the file(...) several times.

make sure your test.txt is on the root of the sd card, if not

IF FILE(CURDIR() + "\whatever\test.txt")

It works on PPC but not work on Emulator

Posted: Tue Aug 29, 2006 5:11 am
by dutch
Dear Richard,

Thanks, I try on the Emulator and It doesn't work. But I try again in my PPC, It work ok.

Thanks&Regards,
Dutch