Ino Copy File
Copy a file inside ComfyUI's folders — without touching a terminal
- success
- message
- rel_path
- abs_path
Every automation workflow eventually needs to move a file. Model lands in the wrong subfolder, a finished image needs to be staged into output, a downloaded LoRA should be filed where the loader can find it. You could ssh in and cp it by hand, or you could let a node do it as part of the run. Ino Copy File is that node: a single-file copy that stays entirely inside ComfyUI's directory system.
It's one of 13 file nodes in the ComfyUI-InoNodes pack, and it follows the pack's standard file-node pattern to the letter: pick a parent folder, a folder, a filename, get success/message/rel_path/abs_path out the other side. If you've used one Ino file node you basically know this one.
The inputs that matter
The node takes a source and a destination, each split into the same three fields:
from_parent_folder/from_folder/from_filename- where the file lives. The parent is a dropdown ofinput,output, ortemp;from_folderis any subfolder path;from_filenameis the file name.to_parent_folder/to_folder- where it goes.
Two optional toggles do the interesting work:
to_filename- leave empty and it keeps the source filename. Set it to rename on the way.overwrite- defaults to false, and the node will refuse to copy over an existing destination unless you flip it. This is the behavior that saves you from accidentally clobbering a good file, and it's also the thing that silently does nothing if you forget it's off.
Outputs are the pack standard: success (boolean), message (why it succeeded or failed - e.g. "Source file not found" or "Destination already exists"), and rel_path + abs_path for the destination.
How it works, under the hood
The source uses shutil.copy2, which matters for one reason: copy2 preserves the file's modification time and permissions, not just the contents. So it behaves like a cp -p, and anything downstream that sorts files by mtime (like the pack's Ino Get Last File) won't get confused by the copy. It also creates destination folders automatically if they don't exist, and - this is a nice touch for a workflow node - it does the disk I/O in a background thread so it doesn't block ComfyUI's event loop on big files.
When you'd use it
- Stage a model for a loader. Copy a downloaded LoRA or VAE from a temp staging area into the right
models/subfolder the loader expects. - Preserve a result. Copy the final image into a "keep" folder instead of letting the next batch overwrite it.
- Organize on schedule. In a batch pipeline, copy files out of a working folder once they're validated.
It's an output-node (marked is_output_node), meaning it's a terminal side-effect node - you run it for the file copy, not to feed data onward.
Installation
Part of ComfyUI-InoNodes:
- ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/nobandegani/comfyui_ino_nodes && cd comfyui_ino_nodes && pip install -r requirements.txt, restart.
Requires Python 3.10+ and ComfyUI 0.18.1+ (full V3 schema). No models, no keys. One honest gotcha: the parent-folder dropdown only covers ComfyUI's input, output, and temp trees - if your file lives outside those, this node can't see it. And remember the enabled toggle every node in this pack has; an off node returns "not enabled" without copying anything.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | true | — |
| from_parent_folder | COMBO | 3 options: input, output, temp | |
| from_folder | STRING | — | |
| from_filename | STRING | — | |
| to_parent_folder | COMBO | 3 options: input, output, temp | |
| to_folder | STRING | — | |
| to_filenameopt | STRING | Leave empty to keep the source filename. | |
| overwriteopt | BOOLEAN | false | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| success | BOOLEAN | — |
| message | STRING | — |
| rel_path | STRING | — |
| abs_path | STRING | — |