File Rename
Description
Section titled “Description”Renames one or more files generated by previous nodes (CSV Create, Save to Excel, ZIP Create, etc). Supports individual or batch renaming with automatic counter, dynamic variables and extension control.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
| files | textarea | No | File path(s). If empty, uses data.filePath from previous node |
| namePattern | text | Yes | Pattern for new name. Variables: {{filename}}, {{counter}}, {{index}}, {{total}}, {{field}} |
| counterStart | text | No | Counter starting number. Default: 1 |
| counterPad | select | No | Counter digits: 1, 2, 3, 4 or 5. Default: 3 (001, 002…) |
| keepExtension | select | No | Keep original extension. Default: Yes |
| newExtension | text | No | New extension (only if keepExtension=No) |
Pattern Variables
Section titled “Pattern Variables”| Variable | Description | Example |
|---|---|---|
{{filename}} | Original name without extension | report-1712345678 |
{{counter}} | Padded counter (001, 002…) | 001 |
{{index}} | Zero-based index (0, 1, 2…) | 0 |
{{total}} | Total number of files | 5 |
{{field}} | Any data field | {{order_number}} |
Output
Section titled “Output”Single file
Section titled “Single file”{ "filename": "dat-001.csv", "filePath": "/temporal/cli_123/dat-001.csv", "urlPath": "https://us1.floogos.com/download/cli_123/dat-001.csv", "original": "report-1712345678.csv"}Multiple files
Section titled “Multiple files”{ "files": [ { "original": "file1.csv", "renamed": "dat-001.csv", "filePath": "...", "urlPath": "...", "counter": "001", "index": 0 }, { "original": "file2.csv", "renamed": "dat-002.csv", "filePath": "...", "urlPath": "...", "counter": "002", "index": 1 } ], "total_renamed": 2, "total_errors": 0}Usage Examples
Section titled “Usage Examples”Sequential counter rename
Section titled “Sequential counter rename”{ "namePattern": "DTO-{{counter}}", "counterStart": "61", "counterPad": "5"}Result: DTO-00061.csv, DTO-00062.csv, DTO-00063.csv
Rename with flow data
Section titled “Rename with flow data”{ "namePattern": "{{order_number}}-invoice"}Result: PT14684-invoice.pdf
Rename and change extension
Section titled “Rename and change extension”{ "namePattern": "export-{{counter}}", "keepExtension": "false", "newExtension": ".txt"}Result: export-001.txt, export-002.txt
- Keeps original extension by default (
.csv,.xlsx,.pdf, etc) - Invalid filename characters (
< > : " / \ | ? *) are replaced with_ - Missing files are reported in
errorsbut don’t stop the process - Single file returns flat format
{ filename, filePath, urlPath }compatible with other nodes - Counter resets on each node execution (not persistent between runs)
Related Nodes
Section titled “Related Nodes”- CSV Create - Create CSV/TXT files
- ZIP Create - Compress files
- SaveToExcel - Create Excel files