I see that filesets are generally defined in terms of patterns (*.doc, or “all hidden files”). However, we frequently work with sets of arbitrary files defined in text files. That is, file “files.fls” contains:
readme.txt
main.exe
index.html
page2.html
…
It would be nice if there was either a new action “FileSet load”, or an extension to the “FileSet define” action to do this.
In the meantime, if anyone has a workaround…
Steve
Yeah, I see what you mean. We could extend the FileSet Define to allow an arbitrary list of files type memo box.
But you could add a new filter for each file if you don’t have too many
Other than that there’s no workaround that I can think of, sorry.
.t8
Well, for us the most important is really getting the filesets out of files, rather than entering them manually into a memo. Loading them from a variable (separated with some delimter, or even newline) would be ok too.
Thought about the filter option, but it’s a bit clunky…I may yet be able to do something with the IniFileIterator…
Steve
Yeah, that might work for you. Or use the File Contents Iterator - it will iterate for each line in the file (and each line represents the name of a file)
.t8
Yeah doing that you could basically implement “copy fileset-defined-in-file” as a one step action list.
Actually what I’ve just done is use an inifile to define multiple sets of file sources and targets like this:
[somedir\somesubdir]
sub1\sub1f.txt=btarg1\sub1targ.txt
someotherfile.txt=someotherfile.txt
[somedir2]
sub2\sub1f.txt=btarg2\sub1targ.txt
…
An FB action list to actually implement all those copies works out as 3 steps: two nested ini iterators and a nested copy.
It gets translated to:
copy somedir\somesubdir\sub1\sub1f.txt btarg1\sub1targ.txt
copy somedir\somesubdir\someotherfile.txt someotherfile.txt
copy somedir2\sub2\sub1f.txt btarg2\sub1targ.txt
Nice. Of course I’m probably horribly abusing the ini file spec (if there is one) putting backslashes in keynames, but FB doesn’t seem to mind…
Steve
cool!
[and the ini file spec is pretty forgiving, all you need is an = to separate name and value]