HELP: List files with output name mapping TYPE: OBJECT SYNTAX: FILES(INPUT['str'...],EXCLUDE['str'...],OUTPUT='str',FORMAT=OUT/TAB/IN/CSV)
The FILES object selects files matching one or more INPUT patterns (wildcards allowed), optionally excluding files that match any EXCLUDE pattern, and prints the matched filenames to the output stream.
The output format is controlled by the FORMAT parameter. The default format OUT prints one output filename per line. When OUTPUT is not specified, the output filename equals the input filename (identity mapping via the implicit [copy] token). The OUTPUT parameter uses pat2str tokens such as [path], [name], [ext], [copy], [upper], [lower], [search=replace], [indN], and others to construct the output name from the input path.
File pattern(s) to include. Wildcards are supported. The parameter is repeatable (array); at least one value is required. For multiple input patterns, all matching files from all patterns are listed.
Wildcard pattern(s) for files to exclude from the result. Repeatable (array). Files whose names match any EXCLUDE pattern are not printed. If no EXCLUDE is given, no files are excluded.
Output filename pattern using pat2str tokens. When not provided, each file is listed with its own name (identity mapping). Common tokens:
Controls the output format for each matched file. Accepted values:
The default OUT format is suitable when only the list of target names is needed. Use TAB or CSV to inspect how the OUTPUT pattern maps each input to its output. Use IN when only the input paths matter (equivalent to LIST but with multi-pattern support).
flcl UTIL run.files(input='/data/*.xml' output='[path]/out/[base].fix') flcl UTIL run.files(input['/a/*.xml','/b/*.dat'] exclude='*.tmp' output='[path]/out/[base].[ext]') flcl UTIL run.files(input='*.txt' format=TAB output='[path]/out/[base].[ext]') flcl UTIL run.files(input='*.txt' format=CSV output='[name]') flcl UTIL run.files(input='*.txt') out=filelist.txt
STRING: INPUT['str'...] - File pattern(s) to include (wildcards allowed); at least one requiredSTRING: EXCLUDE['str'...] - Wildcard pattern(s) for files to exclude [none]STRING: OUTPUT='str' - Output filename pattern (pat2str tokens: [path],[name],[ext],[copy],...) [none]NUMBER: FORMAT=OUT/TAB/IN/CSV - Output format (OUT/TAB/IN/CSV) ['OUT']
OUT - Print output filename only (default)TAB - Print input filename, a TAB, then the output filenameIN - Print input filename onlyCSV - Print input and output filename as ISO-CSV ("in","out")