>>lcFileName = "AlocalFile.txt" >>STRTOFILE("Are you sure?",m.lcfileName) >> >>? "Exists in search path",; >> FILE(m.lcfileName) >>? "Exists in the same folder where exe is",; >> FILE(forcepath(m.lcFileName,justpath(application.servername))) >> >>ERASE (m.lcFileName) >>>
>CLEAR > >CD ("C:\temp") >MD temp2 > >lcFilePath = FULLPATH("") + "\temp2" >lcFileName = "AlocalFile.txt" >STRTOFILE("Are you sure?", "temp2\" + m.lcFileName) >SET PATH TO (lcFilePath ) > >? "Exists in drive root", FILE(JUSTDRIVE(_VFP.servername) + "\" + m.lcFileName) >? "Exists in search path", FILE(m.lcfileName) >? "Exists in the same folder where exe is", ; > FILE(forcepath(m.lcFileName,justpath(application.servername))) > >ERASE ("temp2\" + m.lcFileName) >RMDIR temp2 >Sorry I can't see how that shows that it's unreliable checking at a specific path.