Nodes/ComfyUI Ino Nodes/Ino Remove Folder
ComfyUI Node

Ino Remove Folder

A recursive folder delete inside the graph — handy, and it WILL do what you asked

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Remove Folder
    • success
    • message
    • rel_path
    • abs_path
    enabledtrue
    seed0
    parent_folder
    folder
    dummy_string

    Automation creates junk, and junk needs cleaning. Ino Remove Folder deletes a folder and everything in it, recursively, from inside your ComfyUI graph - the "cleanup pass" node for batch pipelines that generate temp images, download zips, or unpack folders they should have tidied after themselves. It's an output node: it runs as a terminal action in your workflow, not a data transform in the middle.

    Let's be direct about the stakes: this node will recursively delete the folder you point it at, no confirmation dialog, every time the workflow runs. That's a feature when you're clearing a temp dir at the start of a batch. It's a footgun if you mis-set a path. The pack's file nodes all share a defensive design - a parent_folder dropdown restricted to ComfyUI's input, output, and temp trees, so you're sandboxed inside those. But within them, it's full recursive deletion.

    How it works

    You pick parent_folder (input/output/temp), type folder, and the node resolves the two into an absolute path and calls the pack's file helper to remove it recursively. The enabled toggle and the Ino convention apply: disabled means it does nothing and reports success: False with a "Node is disabled" message. The seed input exists (with control-after-generate) mostly so you can force re-execution ordering - there's nothing random about a delete. The optional dummy_string input is the same idea in another form: a place to wire a dependency so this node runs after the node that produced the folder.

    Outputs follow the pack-wide file pattern: success (bool), message, rel_path, and abs_path - so downstream logic can log what was cleaned or verify it happened.

    Inputs and outputs that matter

    • parent_folder - combo: input, output, or temp. The sandbox. Everything else is off-limits by design.
    • folder - relative path under parent_folder. Empty string means the parent itself.
    • enabled - off = no-op.

    Installing it

    Part of ComfyUI-InoNodes (Inoland). 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 after. Requires inopyutils (auto-installed) and a current ComfyUI; no keys or downloads.

    Common issues

    The one worth repeating: recursive delete with no confirmation. Test the path resolution on a junk folder first - put a throwaway file in there, run, confirm it's gone. Then trust it. A subtler version of the same trap: folder is relative to parent_folder, and an empty folder targets the parent folder itself, so if you leave folder blank while pointing at input, you're deleting everything under ComfyUI's input directory. That is real, and it has probably happened to someone. The success/message outputs exist to be logged - wire them into a Print or Save Text if you want a paper trail of what the node decided to eat.

    CategoryInoFileHelper

    Inputs (5)

    NameTypeDefaultDescription
    enabledBOOLEANtrue
    seedINT00–18446744073709550000
    parent_folderCOMBO3 options: input, output, temp
    folderSTRING
    dummy_stringoptSTRING

    Outputs (4)

    NameTypeDescription
    successBOOLEAN
    messageSTRING
    rel_pathSTRING
    abs_pathSTRING