Copy Folder

With the this node you can copy one or more folders to another location.

It has the following configuration options:

  • Folder to copy: here you can specify which folder or folder content should be copied. Select the pencil to open Expression Builder.
  • To file or folder: here you can specify the folder to copy the folder of folder content to. Select the pencil to open Expression Builder.
  • Only copy contents: if you select this checkbox, only the content of the folder is copied. If you leave this checkbox unselected, both the folder itself and the content are copied.
  • Create folders: if you select this checkbox, all folders needed to copy the folder will be created. If you leave this checkbox unselected, copying to a folder that does not exist will fail (for example when you generate to folder on the fly).
  • Overwrite mode: here you can select the required behavior when files and folders already exist in the To Folder. Options:
    • DoNotReplaceRootFolder: if you select this option, the folder copy will fail if the specified To Folder already exists (and Unique Name Mode is set to None).
    • ReplaceRootFolder: if you select this option, the specified To Folder is deleted first (in case it already exists), then the copy is executed.
    • MergeTreeAndDoNotReplaceFiles: if you select this option, the To Folder will contain the merged result of the Folder To Copy and an already existing folder (if applicable). If the To Folder does not yet exist, this works exactly like ReplaceRootFolder. If the To Folder does exist, the files in the Folder To Copy will only be copied if there is no corresponding existing file in the To Folder.
    • MergeTreeAndReplaceFiles: if you select this option, the To Folder will contain the merged result of the Folder To Copy and an already existing folder (if applicable). If the To Folder does not yet exist, this works exactly like ReplaceRootFolder. If the To Folder does exist and if a corresponding file in this folder is found, it will be deleted first and the incoming file will be copied. This is the case for each file in the incoming folder.
  • Unique name mode: here you can control the naming of the copied folder. Options:
    • None: if you select this option, the same name as the input folder will be used.
    • Sequential: the specified name will be used if the default copied folder does not exist. However, if it does exist, the system will try to add 1 to the folder name, and check if that folder exists. If it does not exist, the updated folder name is used. If it does exist, 2 is tried, etc...
    • Random: the specified name will be used if the default copied folder does not exist. However, if it does exist, the system will try to add a random suffix to the folder name, and check if that folder exists. If it does not exist, the updated folder name is used. If it does exist, a new random suffix is tried, etc... Use this mode if you just want a unique name (for example for a temporary folder) and you don't care about the actual name.
    • Sequential+Always: the same as Sequential but it always appends a number, even if the default copied folder does not exist.
    • Random+Always: if you select this option, the naming will follow the same rules as when the Random option is selected, but it always appends a suffix, even if the default copied folder does not exist.