pyio - detect filename list (outm)
Three filename views at once, so you never re-scan a folder twice
- absPath
- name
- nameNoExt
- count
The plain pyio - detect filename list gives you one list output and makes you pick a mode. This one, the (outm) variant, says "why choose?" and hands you all three views of the same scan at once: full absolute paths, basenames, and basenames without extensions, each as its own newline-joined string, plus a count. If you're building a workflow that needs both a path and a display name for the same file - say, reading a prompt file and showing its clean name to a human - this is the node you want instead of running two scans.
"Outm" is shorthand for "multiple outputs," and that's the entire design pitch: one glob, three derived strings, no repeated disk reads. For a folder of a few thousand files, the difference is cosmetic; for a batch pipeline you iterate over, not re-scanning is just nicer.
How it works
Same machinery as its sibling: glob path with pattern to collect absolute paths, then derive three views in one pass:
- absPath - the full paths, newline-joined
- name - just the basename per file (
C:\data\prompts\scene1.txt→scene1.txt) - nameNoExt - basename with the extension stripped (
scene1)
All three are computed from the single os.listdir/glob result, so the outputs always agree with each other - no TOCTOU-style drift between name and path.
Inputs and outputs
- path - directory to scan (absolute recommended)
- pattern - glob, default
*.txt - Outputs: absPath, name, nameNoExt (all STRING, newline-joined) and count (INT)
Installing it
# ComfyUI Manager: search "ymc suite" and install ymc-node-suite-comfyui
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui
Restart after installing. Dependencies are four small pure-Python PyPI helpers that self-install; no models, no GPU footprint.
Gotchas
- The
nameNoExtderivation splits on the last extension only, soarchive.tar.gzbecomesarchive.tar. Keep that in mind if you're handling compound extensions. - No recursion - a single directory, one glob. Nested files are invisible unless you restructure.
- Empty or missing folder → three empty strings and
count = 0, no error. Debugging a pipeline that "found nothing" usually starts here. - Same WAS-conflict note as the rest of the pack: if you run WAS Node Suite alongside, Manager may list shared node names between the two packs - disable one if save nodes start fighting.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | — | |
| pattern | STRING | *.txt | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| absPath | STRING | — |
| name | STRING | — |
| nameNoExt | STRING | — |
| count | INT | — |