Like so:

tempFileObj =new(xtra "fileio")
openFile(tempFileObj, "c:\myfile.xxx", 1)
result =status(tempFileObj)
closefile(tempFileObj)
tempFileObj =0

if (result =-37) then
   -- THE FILE DOES NOT EXIST
end if


This example opens it in mode 1 (for reading), checks the status, closes 
the file (which does nothing if the file wasn't there), frees the instance, 
and checks the result.

- Tab



At 08:33 PM 3/28/02 -0500, stacey.i.strickler.1 wrote:
>I am having trouble checking to see if a file exists using FileIO. I know
>if I try to open a file that is not there I get an error of -37, which is
>a bad file name. How would I go about getting this into a variable so I
>can check the variable to see if the file exists?
>
>Stacey

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to