Nodes/ComfyUI-FilePathCreator/File Path Creator
ComfyUI Node

File Path Creator

Timestamped filenames without touching the keyboard

By HECer·Created 2 years ago·Updated 3 months ago· 14
File Path Creator
    • Filename
    • Folder Path
    • Combined Path
    file_prefixoutput
    time_format%Y-%m-%d-%H%M%S
    output_folder
    filetypetxt

    ComfyUI's default Save Image node names files ComfyUI_00001_ and auto-increments, which is fine until you want your output folder to actually make sense. File Path Creator is the fix: it turns a prefix, a timestamp, and an extension into a clean filename like output_2026-08-13-143022.txt, plus the folder path and the full joined path. It's a string factory, not a file writer - it never saves anything itself, it just hands you a path you can wire into a Save node, a script node, or anything else that eats a path string. If you do batch runs and archive results by time, this is the two minutes of setup that saves you from final_v2_FINAL_really forever.

    The mechanism is dead simple, and the whole pack is dependency-free - pure Python os and datetime, no models, no requirements to fight. On execution it calls datetime.now().strftime(time_format) with your format string, glues it to the prefix with an underscore, appends the extension with a dot, and joins that onto the folder path. Python's strftime codes are the standard ones, so %Y-%m-%d-%H%M%S gives you the year-month-day-time default, and anything strftime understands works.

    The inputs that matter, from the node schema:

    • file_prefix (default output) - the leading text before the timestamp.
    • time_format (default %Y-%m-%d-%H%M%S) - leave it blank to skip the timestamp entirely.
    • output_folder - defaults to ComfyUI's own output folder if empty.
    • filetype (default txt) - the extension, without a dot.

    Outputs are Filename, Folder Path, and Combined Path - the last one is what you'll actually feed into whatever writes the file.

    Where people get burned: first, the node adds the dot itself, so type png in filetype, not .png, or you'll get file.png.png. Second, blanking the time format removes the timestamp - convenient if you want a stable name, but then every run collides on the same file. Third, output_folder is just a string join; the folder doesn't need to exist and this node won't create it. And worth knowing: the code forces itself to re-execute on every run (its IS_CHANGED always returns true), so queued runs each get a fresh timestamp - which is exactly what you want, at the cost of the node never caching.

    Install is one of the easiest in the ecosystem. Either open ComfyUI Manager and search "ComfyUI-FilePathCreator", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HECer/ComfyUI-FilePathCreator
    

    Then restart ComfyUI. Both this node and File Path Extractor land under the "FilePath Utils" category. No models, no extra deps, MIT licensed. This is the node you grab when you want filenames that mean something and don't want to hand-type paths into a text widget again.

    CategoryFilePath Utils

    Inputs (4)

    NameTypeDefaultDescription
    file_prefixSTRINGoutput
    time_formatSTRING%Y-%m-%d-%H%M%S
    output_folderoptSTRING
    filetypeoptSTRINGtxt

    Outputs (3)

    NameTypeDescription
    FilenameSTRING
    Folder PathSTRING
    Combined PathSTRING