Files Move Documentation
Version: 1.0.4
Retrieved:Â 2025-10-09 15:15:52
File(s) Move
Will move 0-n files based on a path and pattern.
This module is designed to be located in the middle of a flow.
Settings
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| File Pattern | String with length 0-64 | The file pattern to use. If not provided in the settings, make sure that the incoming message has the filename set on filemove.pattern. |  |
| Overwrite Target | Boolean | If a file with the same name exists, it will be overwritten. | false |
| Rename Pattern | String with length 0-64 | The pattern to use to rename the moved file. Use {FileName} for the current file name and {Property1.Property2} to access message properties. | {FileName} |
| Target Folder | String with length 0-64 | The folder to move files to. If not provided in the settings, make sure that the incoming message has the filename set on filemove.target. |  |
Input
- If the File Pattern is not set the module requires the filemove.pattern to be included on the incoming message.
- If the Target Folder is not set the module requires the filemove.target to be included on the incoming message.
Output
The same as input
Example 1
Usage with File Pattern set in the module and wildcard in file name. Will move all .txt files in the folder named myFolder to the folder newLocation
Settings
File Pattern = './myFolder/*.txt'
Rename Pattern = '{FileName}'
Target Folder = './newLocation/'
Input
{
example:{
data:{
temp: 342,
rpm: 4500
}
}
}
Output
{
example:{
data:{
temp: 342,
rpm: 4500
}
},
crosser : {
success: true
}
}
Example 2
Usage with File Pattern set in the module, wildcard in the filename and adding a string to the original file name. Will move all .txt files in the folder named myFolder to the folder newLocation with the new file name myPrefix_{FileName}.
Settings
File Pattern = './myFolder/*.txt'
Rename Pattern = 'myPrefix_{FileName}'
Target Folder = './newLocation/'
Input
{
example: {
data: {
temp: 342,
rpm: 4500
}
}
}
Output
{
example: {
data:{
temp: 342,
rpm: 4500
}
},
crosser : {
success: true
}
}
Example 3
Usage with File Pattern not set in the module, wildcard in the filename and accessing properties from incoming message for pattern and target path. Will move all .log files in the folder named Log to the folder Backup with the new file name {example.filename}_{FileName}.
Settings
File Pattern = ''
Rename Pattern = '{example.filename}_{FileName}'
Target Folder = ''
Input
{
filemove: {
pattern: './Log/*.log',
target: './Backup/'
},
example: {
filename: 'pre'
}
}
Output
{
filemove:{
pattern: './Log/*.log',
target: './Backup/'
},
example: {
filename: 'pre'
}
crosser : {
success: true
}
}
Note
If one or more files fails to be moved the crosser object will have the property success set to false and a message property will provide an explanation about the error.
The module will create the folders to move to if they do not exist.
Search Documentation
Destinations
Files