Check if File Exists action does not detect directories

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 a C: partition:

When specifying a file spec of 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.

 

Remove the trailing backslash: Check whether c: exists, not whether c:\ exists.

(Though IMHO it should accept either.)

Steve

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!

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

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

Many thanks for addressing this so quickly!

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!

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