Page 1 of 1

Checking for File Existence

Posted: Wed Dec 23, 2009 5:18 pm
by bohrme
Is there a way to check for file or directory existence prior to loading/reading/deleting/etc? I'd rather not shell out to an external command just for this. I can't find anything on this topic either in the docs or on the internet.

Thanks.

Larry

Re: Checking for File Existence

Posted: Wed Dec 23, 2009 8:53 pm
by FourthWorld
See the "there is" operator, e.g.:

if there is a file tFile then...

or

if there is a folder tFolder then...

Re: Checking for File Existence

Posted: Wed Dec 23, 2009 11:13 pm
by bohrme
Argh! Me thinks the simplicity of the language is givin' me scurvy!

Thank you so much. That makes a lot of sense.

Larry