# Add FileSet Include Pattern via Script?

**URL:** https://www.finalbuilder.com/forums/t/add-fileset-include-pattern-via-script/647
**Category:** Discussion
**Created:** [November 6, 2007, 11:43am UTC](https://www.finalbuilder.com/forums/t/add-fileset-include-pattern-via-script/647 "2007-11-06T11:43:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jonrobertson](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jonrobertson](https://www.finalbuilder.com/forums/u/jonrobertson)
#### Post date: [November 6, 2007, 11:43am UTC](https://www.finalbuilder.com/forums/t/add-fileset-include-pattern-via-script/647/1 "2007-11-06T11:43:36Z")

</div>

Is there a way to add FileSet include patterns via script?&nbsp; I thought Action.FileSetObject might be the ticket, but there is no intellisense information about the properties/methods available for FileSetObject.&nbsp; I've searched the forum and couldn't find the answer.

Thanks

---

<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: [November 8, 2007, 11:16am UTC](https://www.finalbuilder.com/forums/t/add-fileset-include-pattern-via-script/647/2 "2007-11-08T11:16:56Z")

</div>

Hi Jon   
  
 I just had a look into this, not possible at the moment. In any event, I’m not sure adding the patterns via script would work as expected, since the patterns need to be available when the fileset is populated, which happens at runtime. We were discussing this yesterday, we are going to look at this when we get back from teched to see if there is something we can add to make it easier to add to filesets and make them a bit more dynamic at runtime.

---

<div class="post-metadata">

### Author: ![jonrobertson](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jonrobertson](https://www.finalbuilder.com/forums/u/jonrobertson)
#### Post date: [November 8, 2007, 12:04pm UTC](https://www.finalbuilder.com/forums/t/add-fileset-include-pattern-via-script/647/3 "2007-11-08T12:04:41Z")

</div>

Thanks for checking, Vincent.   
  
I was hoping for something I could put in the OnBeforeAction event. In a previous action, I'm reading a list using the FileContents iterator. Inside the iterator, I wanted to use the FileSet's OnBeforeAction event to set the Include Filter based on the line I just read. (The line is a comma separated list of filenames, with wildcards supported.)   
  
If a method was available, such as AddIncludeFilter, I don't see why this wouldn't work.&nbsp; I'd also need something like ClearIncludeFilters so I could start with a clean slate for each iteration.&nbsp; I don't want to edit existing filters.&nbsp; Each comma-delimited list can have a variable number of items.  
  
I suppose I'll use a FileIterator and manually add the files found to a list. This is what I do in our older projects. But it isn't NEARLY as efficient (performance wise) as a FileSet.   
  
Jon

---

<div class="post-metadata">

### Author: ![jonrobertson](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jonrobertson](https://www.finalbuilder.com/forums/u/jonrobertson)
#### Post date: [January 22, 2009, 10:59am UTC](https://www.finalbuilder.com/forums/t/add-fileset-include-pattern-via-script/647/4 "2009-01-22T10:59:46Z")

</div>

> Posted By Vincent Parrett on 08 Nov 2007 04:16 AM   
> we are going to look at this when we get back from teched to see if there is something we can add to make it easier to add to filesets and make them a bit more dynamic at runtime.

Vincent,  
  
Were any changes made to FileSets to make them more dynamic at run-time?

Thanks!

---

<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: [January 22, 2009, 11:03am UTC](https://www.finalbuilder.com/forums/t/add-fileset-include-pattern-via-script/647/5 "2009-01-22T11:03:33Z")

</div>

I don’t believe there were any changes… I’m just looking into this now.
