Specifying the exported file name(s)
The names to give exported files can be configured in the export wizard. Names can be specified directly or placeholders can be used. Placeholders specify particular types of information, and thus are a convenient way to apply a consistent naming pattern to many exports.
The default is to use the placeholders {name}
and {extension}
, as shown in figure 6.26. Using these, the original data element name is used as the basename of the exported file, and the file format is used as the suffix. The actual filename that would result is shown in the Output file name field for the first element being exported.
When deciding on an output name, you can choose any combination of the different placeholders, standard text characters and punctuation, as in {name}({day}-{month}-{year})
. As you add or remove text and terms in the Custom file name field, the text in the Output file name field will change so you can see what the result of your naming choice will be for your data.
An example where specific text instead of a placeholder might be preferred would be if the extension used for a particular format is not as desired. For example, the extension used for fasta files is .fa
. To use .fasta
instead, replace {extension}
with ".fasta
in the Custom file name field, as shown in figure 6.27.
When exporting a single file, the desired filename can just be typed in the Custom file name field. This should not be done when exporting to more than one file, as this would result in every exported file having an identical name.
Figure 6.26: The default placeholders, separate by a "." are being used here. The tooltip for the Custom file name field provides information about these and other available placeholders.
The following placeholders are available:
- {name} or {1} - default name of the data element being exported
- {extension} - default extension for the chosen export format
- {counter} - a number that is incremented per file exported. i.e. If you export more than one file, counter is replaced with 1 for the first file, 2 for the next and so on.
- {host} - name of the machine the job is run on
- {user} - name of the user who launched the job
- {year}, {month}, {day}, {hour}, {minute}, and {second} - timestamp information based on the time an output is created. Using these placeholders, items generated by a tool at different times can have different filenames.
Note: Placeholders available for Workflow Export elements are different and are described in Configuring Workflow Output and Export elements.
Exported files can be saved into subfolders by using a forward slash character /
at the start of the custom file name definition. When defining subfolders, all later forward slash characters in the configuration, except the last one, are interpreted as further levels of subfolders. For example, a name like /outputseqs/level2/myoutput.fa
would put a file called myoutput.fa
into a folder called level2
within a folder called outputseqs
, which would be placed within the output folder selected in the final wizard step when launching the export tool. If the folders specified in the configuration do not already exist, they are created. Folder names can also be specified using placeholders.
Figure 6.27: The file name extension can be changed by typing in the preferred file name format.