LOCAL lcCurDir lcCurDir = SYS(5) + SYS(2003) * Assumes you have directory C:\temp CD c:\temp MD dir1 && Create C:\temp\dir1 MD dir2 && Create C:\temp\dir2 * Create table yourfile.ext in dir1 CD c:\temp\dir1 lnFileHandle = FCREATE( "yourfile.ext") =FCLOSE( lnFileHandle) SET PATH to C:\temp\dir1 && dir1 has yourfile.ext in it CD C:\temp\dir2 && dir2 has no files in it * Use FILE() to check if yourfile.ext exists ?"Path = " + SET( "path") && Confirm path points to C:\temp\dir1 ?"Curdir = " + SYS(5) + SYS(2003) && Confirm current directory is C:\temp\dir2 ?FILE( "yourfile.ext") && True because yourfile.ext is in the path ?FILE( "c:\temp\dir2\yourfile.ext") && False because yourfile.ext is not in dir2 CD &lcCurDirYou get the same result with the more generic SYS(2003)
?FILE( ADDBS( SYS(2003)) + "yourfile.ext") && False because yourfile.ext is not in dir2