Process Path Name
Tear a filename into its useful parts
- full_path
- path_only
- file_name_base
- file_name_ext
- tag_name
Every automation workflow eventually hits the moment where you have a file path and you need a piece of it - the folder, the name without the extension, the extension itself - and ComfyUI gives you no built-in way to split it. Process Path Name is that splitter. One path in, five useful strings out.
The killer use case is deriving related filenames. You load photo_portrait_v3.png, and with this node you can construct photo_portrait_v3.txt for a caption, or photo_portrait_v3_upscaled.png for an output, all without typing anything by hand. It's the glue for batch pipelines that process files and need to name their results after the source.
The five outputs
- full_path - the absolute path, resolved and normalized (relative inputs are made absolute against ComfyUI's working directory).
- path_only - just the directory portion, no filename.
- file_name_base - the filename without its extension:
photo_portrait_v3. - file_name_ext - the extension including the dot:
.png. - tag_name - the pack's opinionated extra: the filename base cut off at the first
-,_, or digit. Sophoto_portrait_v3tags tophoto, andflower-01tags toflower. It's a heuristic for "the actual subject of this file," and it's the output you'll either love or ignore - there's no middle ground.
The single input is path (STRING, default ./).
Installing it
Process Path Name is part of ComfyUI-TinyBee, the small MIT-licensed utility pack from TinyBeeman. No models, no heavy install. 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's under 🐝TinyBee/Util. Standard library only for this node - the pack's jsonata dependency is just for its JSON Parser.
Gotchas
Two things. First, ./ and relative paths resolve against wherever ComfyUI was launched, not the workflow's folder - use absolute paths unless you're sure. Second, tag_name is a heuristic, not a parser: it stops at the first separator or digit, so final_v2_final.png tags to final, which is probably not what you were after. If your filenames are messy, build names from file_name_base and file_name_ext instead and treat tag_name as a bonus.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | ./ | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| full_path | STRING | — |
| path_only | STRING | — |
| file_name_base | STRING | — |
| file_name_ext | STRING | — |
| tag_name | STRING | — |