# Directory exists?

**URL:** https://www.finalbuilder.com/forums/t/directory-exists/384
**Category:** Discussion
**Created:** [March 6, 2007, 8:58am UTC](https://www.finalbuilder.com/forums/t/directory-exists/384 "2007-03-06T08:58:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jhunsaker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/b3f665/32.png) [@jhunsaker](https://www.finalbuilder.com/forums/u/jhunsaker)
#### Post date: [March 6, 2007, 8:58am UTC](https://www.finalbuilder.com/forums/t/directory-exists/384/1 "2007-03-06T08:58:16Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [March 6, 2007, 11:27am UTC](https://www.finalbuilder.com/forums/t/directory-exists/384/2 "2007-03-06T11:27:25Z")

</div>

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”);

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [March 7, 2007, 1:39am UTC](https://www.finalbuilder.com/forums/t/directory-exists/384/3 "2007-03-07T01:39:40Z")

</div>

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
