Working with subfolders

Submit hierarchy

The "Submit hierarchy" tool (and its sibling FTP receive) can be used to fetch files that are delivered in a hierarchy of subfolders. The tool looks for files in the nested subfolder structure up to a certain level (specified in a property), and injects those files into the flow along its output connection(s). The injected files are placed in the output folder(s) at the highest level, in effect flattening the subfolder hierarchy. However, if so requested, the original location in the hierarchy is stored with the file (in its internal job ticket) so that it can be retrieved later to recreate the hierarchy. See Using hierarchy info for more details.

If a subfolder occurs in the hierarchy on a deeper nesting level than what is specified in the "Subfolder levels" property, it is treated as a job folder (i.e. it is moved along as a single entity). Thus, in effect, the "Subfolder levels" property determines which subfolders in the hierarchy should be treated as "hierarchy folders" and which should be treated as job folders.

In the example below you can see the input folder and the corresponding output folder, using Subfolder levels set at 2.


If you do not want to support job folders, set the "subfolder levels" property to a very high value (for example, 999). This will cause all files to be processed separately, regardless of their nesting level in the hierarchy.

Using the Submit Hierarchy function eliminates the need to set up individual input folders on a user by user basis. In the example above, by just adding another sub folder for "Customer C", any job files or folders put in that folder would be seen and processed by Switch without any additional changes to that workflow.

Archive hierarchy

When archiving files (or job folders), you might want to recreate the subfolder hierarchy that was used to deliver them, or you may want to create a different subfolder hierarchy based on which route files took in a flow. Even though the files have been retrieved from different locations and have been moved along the flow through various processing steps, the internal job ticket for each file can remember the information needed to place the file in its appropriate location in the hierarchy.

The archive hierarchy tool extracts this information and creates the corresponding hierarchy (you can still limit the number of subfolder levels to be recreated regardless of the information stored in the internal job ticket). See Using hierarchy info for more details.