Folder

Folder is a central flow element that serves as an intermediary for moving jobs between other flow elements. Each folder flow element instance represents a backing folder on disk that can hold jobs before, after or in between processing steps. The contents of the backing folder can also be accessed by external processes or by users. For example, a folder may be used to submit jobs into a flow or to retrieve the results of a flow.

Keywords

If you enter one of the following keywords in the Search field at the top of the Flow elements pane, the Folder element will be shown in the list:

Processing jobs

Any subfolders placed into a folder are treated as a job folder; that is, the subfolder and its contents are moved along as a single entity.

If a folder has no outgoing connections (that is, it is a "dead-end" folder), a job placed in the folder will stay there until it is removed by some external process that is not under the control of Switch.

If a folder has at least one outgoing connection, a job placed in the folder is removed after it was processed by all outgoing connections. If none of the filters on the outgoing connection(s) match, the job is moved to the problem jobs folder. Refer to Handling problem jobs and error handling preferences for more details.

User-managed versus auto-managed folders

The backing folder (on disk) for a folder on the canvas can be auto-managed (default) or user-managed. The difference is explained in the following table:
  Auto-managed User-managed
Location on disk Special area managed by Switch, i.e. "the application data root" (see Switch preferences: Application data) Location selected by the user (through the Path property)
Editable by the user? No, users should not manipulate auto-managed folders!
Note: The Open in Explorer/Finder option in the context menu is only available if you hold down Shift while right-clicking the folder on the canvas. This is an advanced preference that only should be used for debugging purposes!
Yes, through the Open in Explorer/Finder option in the context menu.
Scanned? No need to scan, as the contents is known and managed by Switch. Yes, at regular intervals as defined in the Preferences (See Switch preferences: Processing)
Lock icon? Yes



No



Remarks External processes (not under control of Switch) and users should not refer to auto-managed folders since they can change the name and/or location under the control of Switch! It is not allowed to point user folders to auto-managed folders (e.g. containing the result of another flow). As auto-managed folders are not scanned, this will not work.

For more information on how to create an auto-managed or user-managed folder (or to switch from one type to the other), refer to Using Folder elements in Switch.

Properties

Note that certain properties are present only for folders that have at least one outgoing connection, and certain other properties are present only for folders that have no outgoing connections ("dead-end" folders)

Property

Description

Name

The name of the folder displayed in the canvas. A newly created folder receives a default name ("Folder 1", "Folder 2", ...), which you should replace with a meaningful name.

Note: If you set up a user-managed backing folder while a "Folder <number>" name is still in place, the flow element automatically adopts the name of the backing folder. For example, if you drag "D:\data\input" onto the canvas, the folder will be named "input".

Description

A description of the folder displayed in the canvas. This description is also shown in the tooltip that appears when moving your cursor over the folder.

Path

The path of the folder's backing folder on disk, or auto-managed.

The following options in italics relate to the frequency of which the folders are scanned for new files. As auto-managed folders are not scanned, these options are only available for user-managed folders.

Leave originals in place

If set to Yes, incoming jobs are left untouched in the folder. Switch never writes to the folder, so read-only access rights suffice; see Leaving originals in place.

If set to No (default), incoming jobs are moved out of the folder; Switch needs full access rights to rename, create and remove files and folders.

Ignore updates (only available if if Leave originals in place is set to Yes)

If set to Yes, a job will only be processed once, regardless of any changes to the file size or modification date. This can be used for workflows where the input job is replaced by the processing result, to avoid triggering endless loops.

If set to No, the job will be reprocessed when its file size or modification date is different. This allows processing jobs which have the same file name as previously submitted jobs.

Minimum file size (KB)

Used to set the minimum file size limit (in KB) before Switch picks up the files or folders. To set no limits, leave it empty.

Scan every (seconds)

The frequency with which this folder is scanned for newly arrived jobs.

If set to Default or zero, the global user preference is used instead; see Switch preferences: Processing.

Time-of-day window

If set to Yes, the folder detects (and moves) newly arrived jobs only during a certain time of the day (specified in the subordinate properties).

Allow from (hh:mm) and Allow to (hh:mm)

The time-of-day window during which to detect jobs. The values are structured as "hh:mm" (hours, minutes) indicating a time of day on a 24 hour clock; an empty value means midnight; two identical values mean the folder always detects jobs.

Day-of-week window

If set to Yes, the folder detects (and moves) newly arrived jobs only during certain days of the week (specified in the subordinate properties).

Allow from and Allow to

The days of the week (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday) during which to detect jobs. Two identical values mean the folder only detects jobs on that specific day.

Day-of-month window

If set to Yes, the folder detects (and moves) newly arrived jobs only during a certain day of the month (specified in the subordinate properties).

Day

The day in the month during which to detect jobs, as a number in the range [1 . .31]; the default value of one means the first or the last day of the month (depending on the following property).

Relative to

Determines whether the day of the month is relative to "Start of the month" or "End of the month".

Color

The color of the folder displayed in the canvas. The default is Yellow, but you can select another color from the list (Orange, Green, Cyan, Blue, Magenta). Alternatively, you can change the color via the context menu, by selecting the Choose color option. Refer to Adjusting the colors of folders and connections.

Attach hierarchy info

If set to Yes, the folder's name is added to each job's hierarchy location path as the job passes through the folder; see Using hierarchy info.

Add name at the top

If set to Yes, the folder name is added at the top of the hierarchy location path; otherwise it is added at the bottom.

Attach email addresses

The specified email addresses are added to each job's email info as the job passes through the folder; see Using email info in Switch.

Attach email body text

The specified email body text is added to each job's email info as the job passes through the folder; see Using email info in Switch.

Attach job state

If the specified string is non-empty, the job state of each job is set to the string as soon as the job arrives in the folder; the statistics view can display the average time spent for each job state. For more information, see Viewing statistics.

Set job priority

  • If set to None (default), nothing happens.
  • If set to any other value (including zero), the job priority of each job is set to this new value as soon as the job arrives in the folder.
    Note: The specified value is converted to a number and rounded to the nearest integer; text strings that do not represent a number are converted to zero.
To specify a negative value, use the Single-line text with variables property editor or provide a script expression.
Safe move

This option is only available for output folders and relevant for transferring job files between folders on different volumes (drives/partitions).

If set to Yes (default value), Switch will first copy the job to a temporary file before deleting the job from the original location. This is useful to avoid that files get lost in case of network problems.

If set to No, Switch immediately moves the job files to the output folder. This may be necessary in case of network permission issues.

Strip unique name

If set to Yes, the unique name prefix added to the filename by Switch is removed before placing the job in the folder. the default is to strip the prefixes from jobs deposited in a dead-end folder - leaving the prefixes in place avoids overwriting a previously deposited job with the same name.

Duplicates

Determines what happens when Strip unique name is set to Yes and a job arrives with the same name as a job already residing in the folder:
  • Overwrite: replace the existing job with the new one – this is the default behavior.

  • Keep unique name: preserve the new job's unique name prefix, leaving the existing job untouched (without unique name prefix).

  • Add version number: add an incrementing version number at the end of the filename body for the new job ("2", "3", … "9", "10", "11"), leaving the existing job untouched. For example, "job.pdf" will become "job1.pdf"," job2.pdf", ...

    Optionally, you can add a separator between the filename body and the version number, for example an underscore. In that case, e.g. "job.pdf" will become "job_1.pdf"," job_2.pdf", ... By default, the Separator property is empty.

    You can also determine the width of the version number, i.e. the number of digits used for the version number. For example, if Width is set to "5", the version number will consist out of 5 digits (e.g. job_00001.pdf), meaning that leading zeros will be added as required.

  • Fail: move the new job to the problem jobs folder, leaving the existing job untouched.

Ignore these subfolders

All subfolders that match the specified folder filter are ignored for the purpose of counting the number of jobs residing in this folder.

This property appears only when the folder's outgoing connection leads to a generic application; if that application stores information in subfolders inside its input folder, this property allows Switch to ignore these folders and their contents.

Show in statistics

Set to Yes, if the average time that jobs reside in this folder should be calculated and displayed in the Statistics pane. For more information, see Viewing statistics.