ComfyUI > Nodes > Mikey Nodes > File Name Prefix Date Dir First (Mikey)

ComfyUI Node: File Name Prefix Date Dir First (Mikey)

Class Name

FileNamePrefixDateDirFirst

Category
Mikey/Meta
Author
bash-j (Account age: 4196days)
Extension
Mikey Nodes
Latest Updated
2024-06-15
Github Stars
0.08K

How to Install Mikey Nodes

Install this extension via the ComfyUI Manager by searching for Mikey Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Mikey Nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

File Name Prefix Date Dir First (Mikey) Description

Generates structured filename prefix with date and custom directory for systematic file organization.

File Name Prefix Date Dir First (Mikey):

The FileNamePrefixDateDirFirst node is designed to generate a structured filename prefix that includes date and custom directory information, which is particularly useful for organizing and managing files systematically. This node helps you create a filename prefix that starts with a date-based directory, followed by any custom directory and text you specify. By using this node, you can ensure that your files are named in a consistent and organized manner, making it easier to locate and manage them later. The node is especially beneficial for AI artists who generate multiple files and need a reliable way to keep them organized. It automatically handles the inclusion of timestamps and custom text, ensuring that filenames are unique and descriptive.

File Name Prefix Date Dir First (Mikey) Input Parameters:

date

This parameter determines whether to include a timestamp in the filename. When set to 'true', the current date and time will be appended to the filename. This is useful for ensuring that each file has a unique identifier based on the time it was created. The default value is 'false'.

date_directory

This parameter specifies whether to create a directory based on the current date. When set to 'true', a directory named with the current date in the format yyMMdd will be created, and the file will be placed inside this directory. This helps in organizing files by the date they were created. The default value is 'false'.

custom_directory

This parameter allows you to specify a custom directory name where the file will be saved. You can use this to categorize files based on your own criteria. The custom directory name will be sanitized to remove any invalid characters. If left empty, no custom directory will be created.

custom_text

This parameter lets you add custom text to the filename. This text can be anything that helps you identify the file, such as a project name or a description. The custom text will be sanitized to remove any invalid characters to ensure it is a valid filename. If left empty, no custom text will be added.

prompt

This optional parameter can be used to include additional information in the filename based on the prompt used to generate the file. This can be useful for AI artists who want to include specific details about the file's content in its name.

extra_pnginfo

This optional parameter allows you to include extra metadata in the filename. This can be useful for adding additional context or information about the file, such as version numbers or other relevant details.

File Name Prefix Date Dir First (Mikey) Output Parameters:

filename_prefix

The filename_prefix output parameter provides the generated filename prefix based on the input parameters. This prefix includes the date-based directory, custom directory, timestamp, and custom text as specified. It ensures that the filename is unique and descriptive, making it easier to organize and manage your files.

File Name Prefix Date Dir First (Mikey) Usage Tips:

  • To keep your files organized by date, set the date_directory parameter to 'true'. This will create a new directory for each day, making it easy to find files based on their creation date.
  • Use the custom_text parameter to add meaningful descriptions to your filenames. This can help you quickly identify the content of each file without opening it.
  • Combine the date and custom_directory parameters to create a structured and hierarchical file organization system. This is particularly useful for large projects with many files.

File Name Prefix Date Dir First (Mikey) Common Errors and Solutions:

Duplicate position numbers detected. Please ensure all position numbers are unique.

  • Explanation: This error occurs when there are duplicate position numbers in the filename elements.
  • Solution: Ensure that each position number is unique and correctly assigned to different elements of the filename.

Invalid characters in custom text or directory name.

  • Explanation: This error occurs when the custom text or directory name contains characters that are not allowed in filenames.
  • Solution: Remove or replace any invalid characters in the custom text or directory name. The node automatically sanitizes these inputs, but ensure your input is as clean as possible.

FileNotFoundError: [Errno 2] No such file or directory

  • Explanation: This error occurs when the specified directory does not exist.
  • Solution: Ensure that the directory path is correct and that the necessary directories are created before saving the file. The node attempts to create directories as needed, but verify the path if the error persists.

File Name Prefix Date Dir First (Mikey) Related Nodes

Go back to the extension to check out more related nodes.
Mikey Nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.