Directory exists?

I need to determine if a directory exists. I’m currently checking for a file with “Check if File Exists” but it would be more effective to look for the directory. Is there a method of achieving this I’m missing?

Thanks.

Hi Jeff,

There’s no standalone action for this at the moment, I’ll add one to the to-do list.

In the meantime, you can emulate the behaviour by using a Run Script action with the following in the OnExecute event (set the script language to JScript):

var fs = new ActiveXObject(“Scripting.FileSystemObject”);
ActionResult = fs.FolderExists(“C:\MyFolderName”);

Jeff,

You can actually use the “Check if File Exists” to also check for a directory. Simply enter the directory name, eg. “C:\temp” and it should work fine.

.t8