FileSet and dynamic exclude patterns

Hello,

Is it possible to add exclude patterns to a fileset define while the script is running?

I'm looking for this option because it is possible that i want to add a file to the exclude list, but i don't want to change the script every time this is needed. When it isn't possible can i you then place this on the whislist.

Best regards,

Richard Floor

Hi Richard,

It can be done - but it’s a bit hacky.

Define a new variable, say %ExcludeThisFile% and default it to a string which you are sure will not match any files, eg. “-------”

Then in the FileSet Define action add an Exlude Pattern and set %ExcludeThisFile% as the Filespec. And then if you need to exclude either a single file or files that match a mask just set %ExcludeThieFile% before the FileSet Define action runs. As I said… bit of a hack and will be a bit nasty if you have a lot of files that need to be excluded that don’t have anything in common (ie. so you can’t use a mask), but it should work.

hth.
.t8

Hi Tate,

Your idea sounds good and doable, but as you said when you have a lot of those exclusions then it is a teadius job. At the moment i have 13 exclusions and this good become more at any time. And i would have to make a lot of variables to fill the pre-defined exclusions and then iterate through a file to filll the variables that feed the exclusions. Then when the file becomes bigger then the number of exclusions you would have to edit the project again to make more variables and exclusions and so on.

So is it maybe possible to make an action that iterates through a file and that can modify a fileset to add the exclusions. This probably needs modifications in the filset define action.

Regards,

Richard Floor