Move Files

Description

The Move files action moves a number of files and/or folders to alternate locations on your file system.

This also works on remote file systems via VFS, e.g. with FTP.

Example for a move (rename) of a file on a FTP server (username/password must be given for source and destination).

  • File source: ftp://username:password@ftpserver/dir/testfile_partly.txt

  • File destination: ftp://username:password@ftpserver/dir/testfile.txt

  • Check "Destination is a file" in the "Destination File" tab.

Options

General Tab

In this tab you can specify the files and/or folders to move.

Option Description

Action name

The name of the workflow action.

Settings

Include Subfolders

Also move the content of sub-folders

Move empty folders

Also move empty folders

Simulate

Don’t actually move anything, just see if it’s possible at all.

Copy previous results to args

Take the files and folders to move from the result rows of a previous action: the source in the first field, the destination in the second and the wildcard in the third. See Result.

Files / Folders

You can specify the list of files or folders with destinations and wildcards in this grid.

Destination File Tab

In this tab you can specify the destination of the files and/or folders and their new filenames.

Option Description

Desitnation file

Create destination folder

Use this option to create the destination folder

Destination is a file

Check this option if you want to move files

Do not keep folder structure

flatten the sub-folder structure if any sub-folders are used

Add date to destination filename

Add a date to the destination filename (yyyyMMdd or 20091231)

Add time to destination filename

Add a time to the destination filename (HHmmss or 235959)

Specify date time format

Allows you to specify your own date-time format. The default is yyyyMMdd'_'HHmmss

Add date before extension

Add the data part before the file extension.

If destination file exists

Select one of these options:

  • Do nothing

  • Overwrite destination file

  • Create file with unique name

  • Delete source file

  • Move source file to folder : use the lower part of the dialog (next option in this grid)

  • Fail

Move to folder

Destination folder

The target folder to move to

Create folder

Add date

Add time

Specify format

Allows you to specify your own date-time format. The default is yyyyMMdd'_'HHmmss

If file exists in destination folder

Select one of these options:

  • Do nothing

  • Overwrite file

  • Unique name

  • Fail

Advanced Tab

Option Description

Success on

Success condition

Select one of these option:

  • Success when all works fine (default)

  • Success when at least x files moved (specify x in the limit field below)

  • Success when number of errors lesser than (specify the max number of errors in the limit field below)

Nr errors lesser than

The number of files moved or the number of errors, depending on the success option above

Add files to result files name

Add the target file names to the list of result files of this workflow action for use in the next workflow actions.

Result

What this action passes on to the next action. See Action results for how results travel through a workflow.

Result Value

True

The Success condition is met: no errors with Success when all works fine, at least Nr errors lesser than files moved with Success when at least x files moved, or fewer errors than Nr errors lesser than with Success when number of errors lesser than (see the note below).

False

The success condition is not met, for example because a source doesn’t exist, a file can’t be moved, or the destination file exists and If destination file exists is Fail. With Success when all works fine or Success when number of errors lesser than, the action stops once the condition is broken: the remaining files are not moved. The number of errors counts the files and entries that failed.

Result files

With Add files to result files name, every moved file is added, with its destination path. A file left in place by Do nothing is not added. With Simulate, nothing is moved but the destination paths are still added.

Result rows

Passed on unchanged. With Copy previous results to args, the source, destination and wildcard come from the first three fields of each result row.

With Success when number of errors lesser than, the action stops and is false as soon as the number of errors reaches Nr errors lesser than, but when the last file brings it to that number, the action is still true. With If destination file exists set to Fail, a file that already exists counts as two errors.