🌻 Any File List
Load and list a whole folder for batch workflows
- Directory_Output
- Image_List
- Text_List
- File_Path_List
- File_Name_List
- File_Name_With_Extension_List
- Total_Files
- Merged_Text
Points at a directory and hands you everything in it - the images loaded, the text loaded, plus all the paths and filenames as lists. This is the swiss-army loader you build batch jobs around. Instead of loading one image at a time, you grab the whole folder and let the rest of the graph iterate.
Why batch nodes matter
Anyone running ComfyUI seriously ends up doing things in bulk: caption a hundred images, upscale a folder, process a dataset. The graph is genuinely powerful for that - batched operations are just different wiring - but you need a way to get a directory into the graph in the first place. Any File List is that entry point. It reads the folder once and gives you both the content and the metadata, so downstream nodes (like the pack's Image Indexer or Text Indexer) can walk through it one item per run.
How it works
You give it a Directory and some filters, and it enumerates the matching files. Filter_By narrows to images, text, or everything; Extension filters further by extension; Deep_Search recurses into subfolders. Load_Cap limits how many it pulls in (so you don't accidentally load ten thousand files), and Skip_Frame skips the first N - handy for paging through a big folder in chunks.
The inputs that matter
- Directory - the folder to read. Server-side path on the machine running ComfyUI.
- Filter_By -
*,images, ortext. Set this to what you're actually after. - Load_Cap - the ceiling on how many files to load; raise it for big folders, keep it sane to avoid loading everything.
- Deep_Search - recurse subfolders or stay at the top level.
It's an output node with eight outputs. The ones you'll use: Image_List and Text_List (the loaded content, as lists), File_Path_List / File_Name_List / File_Name_With_Extension_List (metadata for naming outputs to match inputs), Total_Files (the count - your loop bound), and Merged_Text (all the text files concatenated into one string, which is great for a folder of captions). Directory_Output passes the path onward.
Common issues
Two things bite. First, Load_Cap is a real limit - if your folder has more files than the cap, you silently only get the first batch; raise it or use Skip_Frame to page. Second, Filter_By and Extension have to match your files - set Filter_By to images on a folder of .txt and you get an empty Image_List and confusion. Match the filter to what's actually in the directory. As with all the file nodes here, the path is on the ComfyUI host, so on a cloud instance you're listing the server's folders, not your own machine.
Installing ComfyUI-Addoor
ComfyUI-Addoor (葵花宝典) is a batch and utility pack from developer Eagle-CN. ComfyUI Manager: Install Custom Nodes → search "ComfyUI-Addoor" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Eagle-CN/ComfyUI-Addoor.git
cd ComfyUI-Addoor
pip install -r requirements.txt
Restart and find it under 🌻 Addoor / Batch. It's the natural front end for the Image Indexer and Text Indexer.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| Directory | STRING | — | |
| Load_Cap | INT | 1001–1000 | — |
| Skip_Frame | INT | 00–100 | — |
| Filter_By | COMBO | 3 options: *, images, text | |
| Extension | STRING | * | — |
| Deep_Search | BOOLEAN | false | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| Directory_Output | STRING | — |
| Image_List | IMAGE | — |
| Text_List | STRING | — |
| File_Path_List | STRING | — |
| File_Name_List | STRING | — |
| File_Name_With_Extension_List | STRING | — |
| Total_Files | INT | — |
| Merged_Text | STRING | — |