File Management Tool
Local filesystem operations with wildcard/glob support.
Tool ID
file-management
Credential Required
No
Operations
Common Properties
| Property | Type | Default | Description |
|---|---|---|---|
operation |
string | — | Required. File operation |
source |
string | — | Required. Source path (supports *, ?, [...] wildcards) |
target |
string | — | Target path (for copy, move, mkdir) |
recursive |
boolean | false |
Process directories recursively |
overwrite |
boolean | true |
Overwrite existing target files |
mustExist |
boolean | false |
Fail if source doesn't exist |
notEmpty |
boolean | false |
Fail if source is empty (file = 0 bytes, dir = no children) |
createDirs |
boolean | true |
Create parent directories for target |
1. copy — Copy files/directories
Copies files matching the source pattern to the target. Supports wildcards. Recursive for directories.
Published: operation, source, target, fileCount
2. move — Move/rename files
Moves files matching the source pattern to the target. Supports wildcards.
Published: operation, source, target, fileCount
3. delete — Delete files/directories
Deletes files matching the source pattern. Non-empty directories require recursive=true.
Published: operation, source, fileCount
4. list — List directory contents
Lists files in a directory or matching a pattern. With recursive=true, walks the entire tree and returns full paths.
Published:
- operation, path, fileCount
- files — comma-separated list of filenames (or full paths if recursive)
5. exists — Check file/directory existence
Checks if a path exists and returns metadata.
Published:
- exists — "true" or "false"
- isFile — "true" or "false"
- isDirectory — "true" or "false"
- size — file size in bytes (if exists)
- lastModified — last modified timestamp in milliseconds (if exists)
6. mkdir — Create directory
Creates a directory and all parent directories. Uses source or target as the path.
Published: operation, path, created ("true" if created, "false" if already existed)
Wildcard Support
The source path supports glob patterns:
- * — matches any sequence of characters
- ? — matches any single character
- [abc] — matches any character in the set
Examples:
- /data/*.csv — all CSV files in /data
- /data/report_?.txt — report_1.txt, report_A.txt, etc.
- /data/[0-9]*.log — log files starting with a digit
Wildcard matching applies only to the filename portion (parent directory must be a literal path).
Killable
Yes — sets killed flag (checked between file operations).
Chaining Patterns
- SQL export → copy/move — export data file, then archive or distribute
- FTP download → copy — download to staging, copy to processing directory
- exists → conditional — check if file exists before processing
- list → conditional — list files to determine what to process
- Any tool → delete — clean up temp files after processing
Error Handling
mustExist: fails immediately if no files match the patternnotEmpty: fails if the file is 0 bytes or the directory has no children- Non-empty directories without
recursive=trueare skipped (not failed) createDirs: auto-creates target parent directories
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
createdexistsfileCountfilesisDirectoryisFilelastModifiedoperationpathsizesourcetarget