Nodes/ComfyUI Video BC/Text Batch Saver
ComfyUI Node

Text Batch Saver

Write your whole text batch back to disk

By JioJe·Created about a year ago·Updated 5 months ago· 14
Text Batch Saver
  • batch_texts
  • batch_filenames
  • saved_files
save_dir./output
filename_prefixfile
filename_sep_
filename_pad4
file_extension.txt
encodingutf-8
filename_suffix

The reverse of Text Batch Loader: take a list of strings, write each one to its own file, and hand you the paths. Text Batch Saver is what you put at the end of a batch workflow when the thing downstream - another tool, another app, a render farm - wants actual files, not a ComfyUI list.

Mechanism, straight from the source: it creates the output folder if it doesn't exist, then writes one file per item. If you pass batch_filenames (the aligned list from a Loader), each file is named after that item's original base name; otherwise it uses a zero-padded counter - file_0001.txt, file_0002.txt - with the pad width you set. It returns the full paths of everything it wrote.

Inputs that matter:

  • save_dir (default ./output) - and here's the gotcha. This is a relative path resolved against wherever ComfyUI was launched from, so on a desktop or portable install ./output usually lands in the ComfyUI folder itself, not your output tab. Give it an absolute path if you want the files somewhere you'll actually find them. Bonus: the path accepts a [time(%Y-%m-%d)] token that expands via strftime, so date-stamped output folders are one string away.
  • filename_prefix (default file), filename_sep (default _), filename_pad (default 4, range 1–8), file_extension (default .txt - a dot is added automatically if you forget it), encoding (default utf-8).
  • Optional filename_suffix - appended to every filename - and batch_filenames.

Output: saved_files (LIST) - the paths of the files written. If a write fails, the node doesn't crash; Error: <reason> lands in the list at that slot, so glance at the console after a run.

The free-form file_extension and encoding fields mean it's not limited to plain text: want .md, .srt, or a different encoding? Type it in. That flexibility plus the [time(...)] token is why this node quietly outpunches its "save text" label.

Install is the pack-standard: ComfyUI Manager → search "ComfyUI Video BC", or cd ComfyUI/custom_nodes && git clone https://github.com/JioJe/comfyui_video_BC and restart. Text nodes have no heavy dependencies and no models to fetch. If you're building a folder-of-prompts pipeline, the full loop is Loader → Replace → Saver, and this is the last node you touch before everything is real files on disk.

CategoryBC/Text

Inputs (9)

NameTypeDefaultDescription
batch_textsLIST
save_dirSTRING./output
filename_prefixSTRINGfile
filename_sepSTRING_
filename_padINT41–8
file_extensionSTRING.txt
encodingSTRINGutf-8
filename_suffixoptSTRING
batch_filenamesoptLIST

Outputs (1)

NameTypeDescription
saved_filesLIST