🌻 Text List To String
Load a folder of text files and merge them
- File_Names
- File_Contents
- File_Paths
- File_Names_Suffix
- Count
- Merged_Content
The text sibling of the batch image loader. Point it at a folder of .txt or .csv files and it reads them all in - giving you each file's contents separately as a list, and everything merged into one big string. If you work with datasets, caption files, or a pile of prompt snippets, this saves you from wiring up a dozen Load-Text nodes by hand.
What you'd use it for
The obvious case is caption files. Train a LoRA and you end up with a folder of image_01.txt, image_02.txt, each holding a caption. When you want to review, transform, or feed those back through a workflow, this pulls the whole set in one node, keeping filenames paired with contents so nothing gets scrambled.
The other case is prompt libraries. Keep a folder of prompt fragments - one file per theme, style, or scene - and load them all to browse, combine, or step through. The merged output is handy when you genuinely want everything concatenated into a single blob.
The inputs
Same shape as the batch image loader, which is nice for muscle memory:
- Directory - the folder to read (a path on the machine running ComfyUI).
- Load_Cap - max files to load (default 100).
- Skip_Frame - skip the first N, for paging through a large set.
- seed - for selection order.
The outputs
Six, and the split between list and single is the important part:
- File_Names, File_Names_Suffix - the names, with and without extension (lists).
- File_Contents - each file's text as a separate list entry. This is what you use when you want to keep files distinct and iterate over them.
- File_Paths - full paths (list).
- Count - how many it loaded.
- Merged_Content - every file's text joined into one string. This is the "to string" in the name - when you want the whole folder as a single lump of text, grab this.
The File_Contents list versus the Merged_Content single string is the decision you make each time. Iterating per-file? Use the list. Want it all as one? Use the merge.
Watch for
Like its image cousin, Directory is server-side, so a wrong path gives you an empty load - check Count. And it's txt/csv only; it won't magically read PDFs or docx. Keep your text as plain text files and it just works.
Installing ComfyUI-Addoor
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 look under 🌻 Addoor / Batch, right next to the image batch loader it mirrors.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| Directory | STRING | — | |
| Load_Cap | INT | 1001–1000 | — |
| Skip_Frame | INT | 00–100 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| File_Names | STRING | — |
| File_Contents | STRING | — |
| File_Paths | STRING | — |
| File_Names_Suffix | STRING | — |
| Count | INT | — |
| Merged_Content | STRING | — |