Page 1 of 1
file() function
Posted: Mon Aug 11, 2008 7:22 am
by andreaquaglia
I'm tryin to use the file() function to check if a file in the foldere "\My documents\immagini\" exists, but the function always returns .f. even if the file is there....
Any help ??
Posted: Mon Aug 11, 2008 10:49 am
by Antonio Linares
Andrea,
In Windows Mobile there is no the concept of "drives", so we have to use the current directory. Please try this example:
test.prg
Code: Select all
#include "fwce.ch"
function Main()
MsgInfo( File( CurDir() + "\test.exe" ) )
return nil
Posted: Mon Aug 11, 2008 2:51 pm
by Antonio Linares
Andrea,
You just have to remove the first slash bar:
test.prg
Code: Select all
#include "fwce.ch"
function Main()
MsgInfo( File( "My Documents\myfile.txt" ) )
return nil
Posted: Mon Aug 11, 2008 9:03 pm
by andreaquaglia
thank you Antonio, everything works fine now.
There was a too little bug to be seen in my code!