Nodes/WWAA-CustomNodes/🪠️ WWAA Text File Browser
ComfyUI Node

🪠️ WWAA Text File Browser

Pick a .txt or .csv from a dropdown, get its path — no more typos in file paths

By hgabha·Created 2 years ago·Updated 6 months ago· 38
🪠️ WWAA Text File Browser
    • file_path
    • filename
    directory_path

    Every ComfyUI user has a "type the file path" box, and every ComfyUI user has typos a full path into it at least once. WWAA Text File Browser is the fix for that one specific annoyance: give it a directory, it scans for .txt and .csv files, fills a dropdown with the filenames, and outputs the full path of whatever you select.

    It's a small thing, but it slots into a very real workflow. If you're batch-reading prompts, captions, or wildcard lists from files - the kind of thing you'd pair with the pack's text-reader nodes or a custom prompt-file system - this turns "remember the exact folder and filename" into "click the right dropdown entry." It also makes workflows shareable: someone else opening your graph can pick their own file from the dropdown instead of editing a hardcoded path.

    How it works

    One required input, directory_path - the folder to scan. The node lists only files at the top level (no recursion, so subfolders are ignored) and only .csv / .txt extensions. Two outputs:

    • file_path - the full path to the selected file, ready to feed into any file-reading node.
    • filename - just the file's name, useful for display or for building output filenames alongside it.

    The dropdown is the clever part: the pack ships a small server-side endpoint (/wwaa/get_text_files) that rescans the directory when you change the path, so the choices update live instead of requiring a ComfyUI restart. Empty or bad directory paths don't crash - they just produce an empty list and a console message, and selecting nothing yields empty string outputs.

    Install

    From the WWAA-CustomNodes pack. ComfyUI Manager: search "WWAA Custom Nodes" → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/hgabha/WWAA-CustomNodes
    # restart ComfyUI
    

    No extra dependencies - the pack's requirements.txt declares nothing beyond ComfyUI's stock libraries, and the file scanning is pure standard library. It's under the 🪠️ WWAA/utilities menu.

    Notes and gotchas

    Keep the scope in mind: it's deliberately non-recursive and only looks at .txt and .csv. If your prompt files live in nested folders, or you need .json or .md, this node won't see them - you'd need to flatten the folder or use a more general file browser. And because it's a dropdown driven by a live API call, it's a frontend convenience on top of a simple path-output node; the path it hands you is just a string, so anything downstream that takes a file path will work. It's exactly the kind of small, opinionated utility the WeirdWonderfulAI.Art team built to smooth their own batch file workflows - unglamorous, and genuinely nice to have.

    Category🪠️ WWAA/utilities

    Inputs (1)

    NameTypeDefaultDescription
    directory_pathSTRING

    Outputs (2)

    NameTypeDescription
    file_pathSTRING
    filenameSTRING