# Check if File Exists action does not detect directories

**URL:** <https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878>\
**Category:** Bugs\
**Created:** [August 7, 2007, 4:02am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878 "2007-08-07T04:02:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [August 7, 2007, 4:02am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878/1 "2007-08-07T04:02:42Z")

</div>

In FB 5.5.0.340, the "Check if File Exists" action no longer detects directories.

On a machine with a standard Windows XP installation on&nbsp;a C: partition:

When specifying a file spec of&nbsp;C:\ and a fail action of Fail Action If File or Folder is Missing, the action returns an error.

When the same criteria are run on the same machine in FB 4.2.0.305, the action succeeds.

&nbsp;

---

<div class="post-metadata">

**Author:** ![stevage](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@stevage](https://www.finalbuilder.com/forums/u/stevage)\
**Post date:** [August 8, 2007, 4:20am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878/2 "2007-08-08T04:20:59Z")

</div>

Remove the trailing backslash: Check whether c: exists, not whether c:\ exists.   
  
 (Though IMHO it should accept either.)   
  
 Steve

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [August 8, 2007, 9:03am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878/3 "2007-08-08T09:03:47Z")

</div>

Thanks for the workaround. Is it the intention that the behaviour of 5.5 should change in this respect, or should backwards compatibility be maintained? (I have a large number of existing 4.2 scripts most of which are broken by this behaviour change.)   
  
 Also, should this action work for a UNC path?   
  
 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:** [August 9, 2007, 5:20am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878/4 "2007-08-09T05:20:02Z")

</div>

Hi Graham,   
  
 Thanks for pointing out the incompatibilities.   
  
 The new test build of FB now supports backslashes, same as FB 4.2 (if you use a trailing backslash, the target has to be a directory not a file.)   
  
 You can get the build here:   
  
 [https://www.finalbuilder.com/downloads/finalbuilder/550/FB550\_361.exe](https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_361.exe)   
  
 I’ve added support for UNC paths to our to-do list. It will require a little more work, because it’s actually the Windows API calls we are using that don’t support UNC.   
  
 Regards,   
  
 Angus

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [August 9, 2007, 9:34am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878/5 "2007-08-09T09:34:57Z")

</div>

Many thanks for addressing this so quickly!

---

<div class="post-metadata">

**Author:** ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)\
**Post date:** [October 11, 2007, 1:58am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878/6 "2007-10-11T01:58:19Z")

</div>

Nope, this bug does not appear to be fixed in 5.5.0.361.   
  
 Specifying C:\Windows\ gives “No match found for File Spec”   
  
 Same for C:\   
  
 Please would you confirm this?   
  
 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:** [October 12, 2007, 1:47am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-action-does-not-detect-directories/2878/7 "2007-10-12T01:47:25Z")

</div>

Hi Graham,   
  
Sorry, I think I must have posted one test build too early.   
  
The current test build (436, it's been a while!) definitely supports backslashes. Sorry for the runaround.   
  
https://www.finalbuilder.com/downloads/finalbuilder/550/FB550\_436.exe   
  
Regards,   
  
Angus
