Save File Path and Name 🦬
Get organized output filenames without hand-typing paths
- combined_path 1a_img
- filename 1b_img
- path_and_filename 2_vid_audio
- full_path (no filename) 3_txt
Every ComfyUI user eventually hits the wall where output is a thousand files deep and you can't tell what came from where. This node is the fix: it builds a clean, timestamped folder-and-filename scheme for you - and, nice touch, actually creates the folder on disk when the graph runs. It doesn't save your image itself; it hands you the strings so you can feed them to whatever save node you're using.
It's the second half of a two-node system. You pair it with the pack's Global Folder and Project Settings node, which holds your project name and date format in one place. Change it once, every save node in your graph follows.
How it works
The clever bit: it has a global server-side state shared across all nodes in the pack, "like Use Everywhere." If you leave main_folder and project_name empty, it silently pulls them from whatever Global Folder and Project Settings node you have in the graph. Wire them in and it uses the connection instead. Either way you get:
combined_path-main_folder/2026-08-11 - project_name/filename-date_format_project_name_base_name(e.g.260822_143052_project_01_img)path_and_filename- the two joined, for video/audio save nodesfull_path- the absolute filesystem path under ComfyUI's output directory, with the folder created viaos.makedirs
The date_format is a standard Python strftime string like %y%m%d_%H%M%S (the default) or %Y-%m-%d. It's evaluated live, so every run gets a fresh timestamp - no more overwriting your previous render.
Inputs
- main_folder - connect output 1 from Global Folder and Project Settings. Left empty, it uses the global state.
- project_name - connect output 2, same deal.
- date_format - connect output 3, or type strftime codes directly.
- filename - the base name without extension, e.g.
01_img.
Install
Part of ComfyUI Sokes Nodes 🦬. ComfyUI Manager → search "ComfyUI Sokes Nodes" → Install, then restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/m-sokes/ComfyUI-Sokes-Nodes.git
pip install -r requirements.txt
Then restart ComfyUI. No models, no heavy deps - just the pack's standard requirements.
Gotchas
The main one to internalize: this node only makes strings and folders. It's designed to sit in front of a save node - pass path_and_filename to a VHS or video save node, or use full_path to point at the folder. If you're using the pack's default save flow, remember the folder gets created inside ComfyUI's output directory, so a main_folder of Z_Image_Turbo lands in output/Z_Image_Turbo/....
If your save node re-runs on every queue (most output nodes do), you'll get a folder per run - which is the point, but if you're generating a hundred variations of one project you may want to drop the date from date_format so they land in one folder. Slight learning curve, but once it's set up you never hand-write a path again.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| main_folder | STRING | Connect main_folder (output 1) from Global Folder and Project Settings node here | |
| project_name | STRING | Project name (connect output 2 from Global Folder and Project Settings if desired) | |
| date_format | STRING | %y%m%d_%H%M%S | Formatted date/time from Global Folder node (output 3) |
| filename | STRING | 01_img | Base filename without extension |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| combined_path 1a_img | STRING | — |
| filename 1b_img | STRING | — |
| path_and_filename 2_vid_audio | STRING | — |
| full_path (no filename) 3_txt | STRING | — |