# Create fileset excluding all files directly under base directory

**URL:** https://www.finalbuilder.com/forums/t/create-fileset-excluding-all-files-directly-under-base-directory/1119
**Category:** Discussion
**Created:** [February 26, 2009, 6:24am UTC](https://www.finalbuilder.com/forums/t/create-fileset-excluding-all-files-directly-under-base-directory/1119 "2009-02-26T06:24:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![efridman](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@efridman](https://www.finalbuilder.com/forums/u/efridman)
#### Post date: [February 26, 2009, 6:24am UTC](https://www.finalbuilder.com/forums/t/create-fileset-excluding-all-files-directly-under-base-directory/1119/1 "2009-02-26T06:24:28Z")

</div>

Hi

&nbsp;

Is it possible&nbsp;to create a fileset that will include all the directories (with their content) that&nbsp;under the base directory

excluding all files that are directly under the base directory ?

( I don't want to specify each one if the directories I want to include since there are a lot of them and their name is changing and same for the files I want to exclude)

i.e.

C:\test\1.txt - exclude

C:\test\2.dll - exclude

C:\test\AAA\a.txt - include

C:\test\BBB\a.txt - include

C:\test\BBB\CCC\a.txt - include

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [February 27, 2009, 12:08pm UTC](https://www.finalbuilder.com/forums/t/create-fileset-excluding-all-files-directly-under-base-directory/1119/2 "2009-02-27T12:08:33Z")

</div>

Hi Elad,   
  
 Yes, you can achieve this by specifying a ‘Filter’ that only matches file which are under a sub-directory of the root folder. Following on from the example you posted, the filter will need to be configured with the following options:   
  
 Text: \test\.\*\   
 Use Regular Expression: Checked   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![efridman](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/e/a88e57/32.png) [@efridman](https://www.finalbuilder.com/forums/u/efridman)
#### Post date: [March 1, 2009, 1:49am UTC](https://www.finalbuilder.com/forums/t/create-fileset-excluding-all-files-directly-under-base-directory/1119/3 "2009-03-01T01:49:23Z")

</div>

Thanks, it working great.
