Rename File

The Rename File activity is used to rename file or directory.

Settings

Field Description
Create Non-Existing Directories

When this field is set to true, the activity creates all directories in the specified path, if they do not already exist. If this field is set to false with non-existing one or more directories in the specified path, it throws an error.

Input

The Input tab displays the following fields.

Field Description
fromFileName

The path and name of the file or directory to rename.

For example, to rename a directory, specify /opt/flogo/myDirectory

toFileName The new name and path of the file or directory. For example, /opt/flogo/newfilename
overwrite

Set this field to true to overwrite the existing file with the same name when renaming.

If the specified file or directory exists and this field is set to false, then the activity throws an error.

Note: Overwrite feature is only applicable for files.

Output

The output schema displays the metadata fields of a new file/directory in a read-only format. The metadata object contains fullPath, name, size, mode, modTime, and isDir fields.

Loop

For information on Loop, see the "Using the Loop Feature in an Activity" section in the TIBCO Flogo® Extension for Visual Studio Code User Guide.