Page 1 of 1

Check for folder existence?

Posted: March 8th, 2007, 8:48 pm
by byronnash
What's the best way to check for this? I had been using

Code: Select all

var theFolder = new Folder(folderLocation);
if(theFolder instanceOf folder){
do some stuff
}
I'm getting my location from a text file. It seems to always return a folder even if the text in the file points to an invalid one. Is there a folderExists function?

Folder exists attribute

Posted: March 8th, 2007, 9:44 pm
by redefinery
Hi Byron...

Use the exists attribute for the Folder object, as in:

Code: Select all

var theFolder = new Folder(folderLocation);
if (theFolder.exists) {
    do some stuff
}
Hope this helps.

Jeff