Hi,
I am trying to develop a tool to untar, unzip... an archive file in order to obtain each file contained in the archive as a dataset in the current history.
My problem is about the unknown various number of files contained within the archive file.
I was thinking about having an output variable in my .xml that would be fed by my wrapper and returned in order to filter the number of outputs in my .xml ; but the <output> section in the .xml can only get "files" not numbers, right?
In my tool, I ask the user to fill the number of files he wants from the archive ; in .xml I have put 10 outputs for files contained in the archive (out1, out2...) precised in my command and in the output section (for now I can retrieve maximum 10 outputs from my archive).
In the output section, I would like to use <filter> tag in order to select only the output number inferior than the number specified by the user:
<outputs> <data name="output_uncomp1" format="${uncompressed_files_format}" label="${input_compressed.name}_1"/> <data name="output_uncomp2" format="${uncompressed_files_format}" label="${input_compressed.name}_2"> <filter>num_uncompressed_files >= "2"</filter> </data> <data name="output_uncomp3" format="${uncompressed_files_format}" label="${input_compressed.name}_3"> <filter>num_decompressed_files>= "3"</filter> </data>
It does not seem to work well. Could you please tell me if it is possible to use the filter tag as such? If so, how?
Would you have a better idea to implement that tool?
Thanks in advance,
best regards,