ComfyUI-FilePathCreator

ComfyUI-FilePathCreator
★ 14

文件命名时间戳输出路径ComfyUI节点
为ComfyUI生成基于参数的动态文件名,支持自定义前缀、时间格式、扩展名与输出文件夹,便于有序保存输出。
💡 为批量处理或自动化工作流生成规范化输出文件名。
🍴 4 Forks💻 Python🔄 2026-03-13
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/f414772aa5c3
Diagram
Diagram
📄 README

ComfyUI-FilePathCreator

Overview

The ComfyUI-FilePathCreator is a custom node extension for ComfyUI designed to generate dynamic filenames based on user-defined parameters. This node helps streamline the process of creating organized and timestamped filenames, ideal for saving output files in a structured manner.

Features

  • Customizable Filename Prefix: Define a custom prefix for your filenames to easily identify and categorize your files.
  • Dynamic Timestamps: Generate filenames with current timestamps using customizable time formats.
  • Optional Output Folder: Specify an output folder where files should be saved. If not specified, a default local output folder is used.
  • File Type Specification: Choose the file extension for the generated filenames. If the file type is left empty, the filename is generated without an extension.
  • Inputs

  • file_prefix (required):
  • Type: STRING
  • Default: "output"
  • Description: The prefix to be used for the generated filename.
  • time_format (required):
  • Type: STRING
  • Default: "%Y-%m-%d-%H%M%S"
  • Description: The format for the timestamp in the filename. Uses Python’s datetime format codes.
  • output_folder (optional):
  • Type: STRING
  • Default: ""
  • Description: The folder path where the file should be saved. Defaults to a local “output” folder if left empty.
  • filetype (optional):
  • Type: STRING
  • Default: "txt"
  • Description: The file extension for the generated filename. If left empty, no file extension is added.
  • Outputs

  • Filename: The generated filename based on the prefix and timestamp.
  • Folder Path: The path of the output folder.
  • Combined Path: The full path combining the output folder and filename.
  • Example Usage

    After installing the ComfyUI-FilePathCreator, you can use it to generate filenames like output_2023-07-07-143022.txt and save them in a specified folder. This is particularly useful for batch processing or saving results from automated workflows in a consistent and organized manner.

    FilePathExtractor

    Overview

    The FilePathExtractor is a custom node extension for ComfyUI designed to extract components from a given file or folder path. This node facilitates the decomposition of file paths into understandable and reusable parts, enhancing workflow automation and path management.

    Features

  • Path Input: Accepts one or many paths (batch/list compatible) to files or folders.
  • Extract File Name: Retrieves the name of the file without the extension.
  • Extract File Extension: Identifies the file’s extension.
  • File Name With Extension: Retrieves the filename along with its extension.
  • Extract Folder Name: Gets the name of the folder containing the file.
  • Extract Folder Path: Provides the folder path (or the original text if no directory segment is present).
  • Batch-Friendly Output: Works with ComfyUI list processing by returning one value per input path in each output socket.
  • Inputs

  • path (required):
  • Type: STRING
  • Default: ""
  • Description: The path to a file or folder from which to extract information.
  • Outputs

  • File Name: The name of the file extracted from the path.
  • File Extension: The extension of the file (without the leading dot).
  • File Name With Extension: The filename along with its extension.
  • Folder Name: The name of the folder containing the file.
  • Folder Path: The derived folder path (or original input if no folder segment exists).
  • Example Usage

    After installing the FilePathExtractor, you can input a file path like C:/Folder/FolderName/Filename.png and obtain:

  • File Name: Filename
  • File Extension: png
  • File Name With Extension: Filename.png
  • Folder Name: FolderName
  • Folder Path: C:/Folder/FolderName
  • Licensing

    This project is licensed under the MIT License. See the LICENSE file for more details.

    Contributions

    Contributions are welcome! Please feel free to submit a pull request or open an issue on the GitHub repository.