Move File (mv)
The missing shutil.move node for ComfyUI
- output_path
This is exactly what it sounds like: mv as a ComfyUI node. Give it a source path and a target directory, and it relocates the file there, no shell scripting required.
What it's for
ComfyUI writes outputs into its own directory structure by default, which is fine until your pipeline needs those files somewhere specific - a folder the next automation step watches, a Google Drive mount, a per-run archive directory. Rather than post-process outside the graph, this node lets you move a file as part of the workflow itself. It's the kind of utility that only exists because someone building an automated pipeline (this pack's author, running things through Google Colab going by the README) got tired of doing it by hand.
How it works
It's a thin wrapper over a standard file move: give it source_path, give it target_dir, and it relocates the file, returning the new location so downstream nodes know where to find it. Nothing fancier than that - no batching, no glob patterns.
Inputs and outputs
source_path(STRING) - the file to move.target_dir(STRING) - where it should end up.- Output:
output_path(STRING) - the resulting path, ready to wire into whatever needs to load the file next.
Installing it
The README only documents one install path, and it's simple enough that ComfyUI Manager isn't strictly necessary - though it's worth a search first (try the repo name or "sortlist") since Manager indexes plenty of small packs even without their own README mentioning it. If it doesn't show up, do it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/huyl3-cpu/comfyui-sortlist.git
Restart ComfyUI. No models, no extra pip dependencies documented - this is pure filesystem plumbing.
Common issues and troubleshooting
It only moves one file at a time. The schema takes a single source_path string - there's no wildcard or glob support. If you need to move a whole batch, you'll want to loop over a file list (this same pack's File-List-Loader or File-List-To-File-Path, paired with SimpleForLoopStart/SimpleForLoopEnd) rather than expect this node to sweep a directory in one call.
Paths only make sense inside the machine actually running the job. This node was built for the "everything lives on one Colab VM" world the README describes - source_path and target_dir have to be real paths on whatever filesystem ComfyUI is executing on. On a hosted or serverless run, that's the run's own container, not your laptop; you can't point target_dir at somewhere on your local machine.
No documented overwrite behavior. The schema doesn't expose an "overwrite" flag or any conflict handling, so what happens when target_dir already contains a file with the same name isn't specified anywhere - it'll be whatever the underlying move call does by default. Test with a throwaway file before wiring this into anything you'd mind losing data from.
Empty strings by default. Both required fields default to "". Leave either blank and you're asking the node to move nothing to nowhere - fill both in explicitly rather than relying on a sensible fallback, because there doesn't appear to be one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| source_path | STRING | — | |
| target_dir | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |