Nodes/ComfyUI-JDCN/JDCN_FileMover
ComfyUI Node

JDCN_FileMover

Sort your output folders by actually moving the files

By daxcayΒ·Created 2 years agoΒ·Updated about a year agoΒ· 159
JDCN_FileMover
    • NewFilePaths
    β—„FilePathsβ€”β–Ί
    β—„OutputDirectorydirectory pathβ–Ί
    β—„OverwriteFilefalseβ–Ί

    JDCN_FileMover moves files from wherever they are to a folder you specify. Not copies - moves, shutil.move under the hood, so the source disappears after the run. If you've ever stared at a output/ folder holding a month of disorganized renders, this is the node that turns ComfyUI itself into your file organizer.

    Why you'd reach for it

    The workflow that makes this shine: a wild folder full of mixed files (images, JSON sidecars, videos, latents) gets scanned by JDCN_AnyFileList, split into per-type lists by JDCN_AnyFileListHelper, and each list gets wired into its own JDCN_FileMover pointed at a tidy destination. Queue once, and your files sort themselves into folders. The README's example does exactly this - one mess in, sorted folders out.

    It's also a natural fit for animation pipelines where your outputs are scattered across intermediate directories and you want everything collected in one place at the end.

    Inputs and how it behaves

    • FilePaths - a list of full paths to move (list-input, so wire it from AnyFileList or AnyFileListHelper).
    • OutputDirectory - where the files go. The node creates the folder if it doesn't exist.
    • OverwriteFile - what happens on a name collision. With it off, an existing destination file gets a new name (video_1.mp4, video_2.mp4…). With it on, the destination is overwritten in place.

    It's an output node, so treat it as a terminal/sink: wire the inputs, queue, and let the side effect happen. The NewFilePaths output exists in the schema, but you're really here for the moving, not for feeding it onward.

    A word about "move" vs "copy"

    This is the part that surprises people: it's a true move. If your source folder was the only copy, the file is gone from there afterward. That's the point when you're organizing, but it's a footgun if you meant to duplicate. There's no dry-run mode, so either back up first or make sure your sources aren't precious.

    Installing it

    Part of ComfyUI-JDCN:

    • ComfyUI Manager β†’ Install Custom Node β†’ search JDCN β†’ install ComfyUI-JDCN β†’ restart.
    • Or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/daxcay/ComfyUI-JDCN.git
    cd ComfyUI-JDCN
    pip install -r requirements.txt
    

    Restart; it's under πŸ”΅ JDCN πŸ”΅. Only dependency is piexif, no models.

    Common issues

    The classic failure is a bad path: if FilePaths is empty or the paths don't exist, the node prints an error and moves nothing - it fails silently from the UI's perspective, so check the console log. If files "vanish," remember it's a move, not a copy, and check both folders. And if you're moving files that ComfyUI has open or that are in use on Windows, the OS will refuse - close whatever's holding them first.

    One more: destination name collisions with OverwriteFile off silently rename, which can give you a folder of render_7.mp4 duplicates you didn't expect. If you want deterministic output, turn overwrite on and accept the risk, or sort into per-run subfolders.

    CategoryπŸ”΅ JDCN πŸ”΅

    Inputs (3)

    NameTypeDefaultDescription
    FilePathsSTRINGβ€”
    OutputDirectorySTRINGdirectory pathβ€”
    OverwriteFileBOOLEANfalseβ€”

    Outputs (1)

    NameTypeDescription
    NewFilePathsSTRINGβ€”