Get File List
Turn a folder into a workflow input
- file_list
There's a whole class of ComfyUI workflows that are really just "do something to every file in this folder." Batch upscaling, batch img2img, processing a folder of reference images. The thing every one of those needs is a list of filenames, and Get File List is the node that produces it - it globs a directory into a STRING list with filtering and sorting built in.
It's the front door for batch processing in this pack. Hand it a path and a glob pattern and it walks the directory tree, filters to the file types you care about, sorts the results, and hands you a list you can feed into a batch loop, a picker, or a save/compare chain. Everything downstream that works on lists can now work on your actual files.
How it works
Under the hood it's Python's glob with recursive=True: it joins your path with glob_pattern and collects every match, recursively. Then it applies the extension filter, sorts according to your choice, and returns the list. The default pattern **/* grabs everything in the tree; the default extension list is your standard image set.
The inputs that matter:
- path (STRING, default
./) - where to look. Relative paths resolve against ComfyUI's working directory, so absolute paths are usually the safer bet. - glob_pattern (STRING, default
**/*) -**/*for all files recursively, or something like*.pngto narrow the glob itself. - sort_method -
default,date(by file modification time),filename,parent folder,full path, orrandom(seeded by theseedinput). - sort_ascending (BOOLEAN, default on) - flip for newest-first or reverse alphabetical.
- allowed_extensions (STRING, default
.jpeg,.jpg,.png,.tiff,.gif,.bmp,.webp) - comma-separated; leave blank to allow everything. - dest_path (STRING, optional) - this one's clever: it excludes files whose base name already exists in
dest_path, regardless of extension. Built for "skip images I already converted."
The output is file_list, a list of full paths ready for the next node.
Installing it
Get File List is one node in ComfyUI-TinyBee, the small MIT-licensed utility pack from TinyBeeman. No models, no heavy deps. Via Manager:
- ComfyUI Manager → Custom Nodes Manager.
- Search "ComfyUI-TinyBee" and install.
- Restart ComfyUI.
Or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
Restart and it lives under 🐝TinyBee/Lists. Its jsonata dependency is only for the pack's JSON Parser node.
Gotchas
Path discipline is the thing that bites. ./ is relative to where ComfyUI launched, which is rarely where you think it is - when in doubt, use an absolute path. The date sort reads file mtime, so it reflects disk time, not the name. And dest_path matching is by base name with extension stripped, so photo.png in the source is skipped if any photo.* exists in dest. Pair the output with Filter List or Randomize List for the full batch-processing pipeline.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | ./ | — |
| glob_pattern | STRING | **/* | — |
| sort_method | COMBO | default | 6 options: default, date, filename, parent folder, full path, random |
| sort_ascending | BOOLEAN | true | — |
| seed | INT | 00–18446744073709550000 | — |
| allowed_extensionsopt | STRING | .jpeg,.jpg,.png,.tiff,.gif,.bmp,.webp | — |
| dest_pathopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| file_list | STRING | — |