# Check if File exists bug?

**URL:** https://www.finalbuilder.com/forums/t/check-if-file-exists-bug/2634
**Category:** Bugs
**Created:** [May 19, 2006, 12:50pm UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-bug/2634 "2006-05-19T12:50:37Z")
**Posts on this page:** 4
**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: [May 19, 2006, 12:50pm UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-bug/2634/1 "2006-05-19T12:50:37Z")

</div>

Hello, Since I upgraded this morning to 4.1, When checking if fileexists, I keep getting a ‘File or Folder Does not exist’ error - eventhough the files are present. If I re-install the previous 4.0version, it works again.   
Do I need to set a variable if the file exists?  
  
Is this a known issue?  
  
Thanks  
Michelle

---

<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: [May 19, 2006, 2:04am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-bug/2634/2 "2006-05-19T02:04:18Z")

</div>

Hi Michelle,  
  
Sorry to hear you’re having problems.  
  
Unfortunately, that action hasn’t changed since FinalBuilder 4.0. I just tested it in 4.1 here and it seems to work. It is mildly annoying that it doesn’t print the file name in the log, though - I’ll look into fixing that.  
  
Are you running the exact same action in 4.0 and 4.1? What file are you checking for?  
  
Thanks,  
  
  
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: [May 19, 2006, 6:03am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-bug/2634/3 "2006-05-19T06:03:30Z")

</div>

Hi,  
The particular action goes something like this:  
Check if File Exists: %CurDBDestPath%\*.mdf  
   
and another one looking for   
Check if File Exists: %CurDBDestPath%\*.mdf  
  
I am looking for MS SQL database files.  
  
If I enter Check if File Exists: %CurDBDestPath%\Name.mdf  
the file can be found, so it seems there the issue may be with the \* wildcard?   
  
Thanks,  
Michelle

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [May 22, 2006, 3:13am UTC](https://www.finalbuilder.com/forums/t/check-if-file-exists-bug/2634/4 "2006-05-22T03:13:11Z")

</div>

Posted By Michelle Buckley on 19 May 2006 11:03 AM  
  
If I enter Check if File Exists: %CurDBDestPath%\Name.mdf  
the file can be found, so it seems there the issue may be with the \* wildcard?   
  
Thanks,  
Michelle  
  

  
  
The Check if File Exists action does not support wildcards (will add that to the todo list). Another way to do what you want would be to use a FileSet. Add a Fileset action to select the files you want to test for, and then you can test for %FileSetName.Count% \> 0 ins an If...Then Action.
