File Name Prefix (Mikey)
File Name Prefix (Mikey Nodes) — build a smart prefix for ComfyUI's Save Image
- filename_prefix
ComfyUI's built-in Save Image node takes a filename_prefix string, and if you've ever noticed you can type myproject/batch1 into that field and get a subfolder for free, that's the trick this node automates. Instead of typing the date and a folder path by hand every session, FileNamePrefix builds that string for you and hands it over as a wire.
The mechanism
It's a tiny, single-purpose string builder. Feed it a few flags, get back one filename_prefix STRING output - plug that straight into the core Save Image node's filename_prefix widget (right-click it, convert to input) and you're done. Four inputs, no images involved, no side effects: this node just does string assembly.
date(true/false, default true) - stamp today's date into the prefix.date_directory(true/false, default true) - nest the output under a folder named for today's date, rather than just prepending the date to the filename itself.custom_directory- an extra subfolder of your choosing, on top of or instead of the date folder.custom_text- free text appended into the prefix, good for a project name, a checkpoint name, or a short note to your future self about what this batch was testing.
Run it once per session and every save from that point lands in a dated, organized folder automatically - genuinely useful once you've got a few thousand generations piled up in one flat directory and can't find anything.
Installing
Comes bundled with the full pack, not sold separately. Through ComfyUI Manager: search "Mikey Nodes," install, restart. Or manually: cd ComfyUI/custom_nodes && git clone https://github.com/bash-j/mikey_nodes and restart. It's pure string manipulation under the hood - no models to download, no GPU dependency, nothing that can go wrong beyond a typo in a path field.
Its sibling, and the gap in the docs
There's a second node in the pack, FileNamePrefixDateDirFirst, with the exact same four inputs and the same single output. Neither node is documented by name in the pack's README - they only appear in an unexpanded "Additional Nodes" bullet list. Going by the name alone, the difference is almost certainly folder ordering: whether the date directory or your custom directory comes first in the resulting path. I can't confirm the precise ordering logic without reading the node's source, so if the exact folder nesting matters to your pipeline, drop both nodes on a test canvas and compare the string each one outputs before you commit to one.
Troubleshooting
- Nothing changes when you edit the widgets. Make sure you actually converted Save Image's
filename_prefixwidget to an input and wired this node's output into it - if you left it as a plain text widget, FileNamePrefix's output goes nowhere. - Forward slashes vs backslashes. If you're typing a
custom_directoryvalue by hand, use forward slashes (/) regardless of OS - that's the convention ComfyUI's own path handling expects, and it avoids the classic Windows-path-in-a-string-field bug. - Can't find the node after install. This is the standard "missing custom node" ComfyUI complaint - restart the whole ComfyUI process (not just refresh the browser tab) after installing any new pack, and check ComfyUI Manager's log for install errors if it still doesn't show up.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| date | COMBO | true | 2 options: true, false |
| date_directory | COMBO | true | 2 options: true, false |
| custom_directory | STRING | — | |
| custom_text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filename_prefix | STRING | — |