Smart File Transfer (Auto-Rename)
Copy and move files from inside your workflow
- result_message
- final_path
- success
Most ComfyUI workflows end at the save node and expect you to shuffle the results around in a file manager afterward. Smart File Transfer is the "but what if the workflow did that itself" node: give it a source file, a destination, and it copies or moves the file with collision handling, directory creation, and a report of what it actually did.
The practical angle: you've got a pipeline that renders, and you want the output automatically organized into dated folders, or copied to a network drive, or moved out of the render directory into the "keep" folder - without you being the middleman. It's file management as a graph node, with sensible failure reporting instead of silent confusion.
The inputs that matter
The required ones are simple: source_path (the file), destination_path (a folder or full file path), operation (copy or move), create_directories (on by default - it'll make the destination folder tree for you), rename_pattern, and collision_handling. The optional custom_filename lets you rename on the way.
The two settings worth understanding up front:
collision_handling-auto_rename(default) appends(1),(2)etc. to avoid clobbering;overwritereplaces;skipleaves the existing file alone.auto_renameis the safe default for "never lose a file," and it's why the node's display name says "(Auto-Rename)".rename_pattern- the style of the auto-rename suffix:parentheses(file(1).ext),underscore(file_1.ext), ordash(file-1.ext).
Under the hood it's stdlib shutil/pathlib - it validates the source exists and is a file, walks up the numbering until it finds a free name, and raises a clean error (returned as success: false) rather than a traceback when something's wrong.
Outputs
Three, all designed to be branchable:
result_message- a STRING saying what happened (or why it failed)final_path- the actual path the file landed at, so you can wire it onward even when auto-rename changed the namesuccess- a BOOLEAN you can gate on
That trio is the node's real value: in a fragile graph, you can check success and skip downstream work instead of blindly assuming the file moved.
What it isn't, and honest gotchas
It's a file transfer node, not a checksum-verified sync tool - the README blurb mentions checksums and "organized directory structures," but what the code actually does is copy/move with collision handling. Don't plan a backup pipeline on it.
Real gotchas: it's not a scheduler, so it runs when your workflow runs - if the source file doesn't exist yet at that moment, you get a clean failure, not a retry. And if your destination_path is a full file path rather than a folder, make sure it's what you meant; the node treats the destination as the file target when it looks like one. When in doubt, point it at a folder and let create_directories + auto-rename do the work.
Install
One of ~69 nodes in TrentNodes (TrentHunter82/TrentNodes):
# ComfyUI Manager: search "Trent Nodes"
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes && pip install -r requirements.txt
No extra dependencies beyond the pack's core. It's a small node, but the pattern - "let the graph finish the job instead of you" - is the kind of thing that quietly saves you twenty minutes a day once you remember it exists.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| source_path | STRING | — | |
| destination_path | STRING | — | |
| operation | COMBO | copy | 2 options: copy, move |
| collision_handling | COMBO | auto_rename | 3 options: auto_rename, overwrite, skip |
| create_directories | BOOLEAN | true | — |
| rename_pattern | COMBO | parentheses | 3 options: parentheses, underscore, dash |
| custom_filenameopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| result_message | STRING | — |
| final_path | STRING | — |
| success | BOOLEAN | — |