Add Filename Prefix [RvTools]:
The Add Filename Prefix [RvTools] node is designed to enhance file management by allowing you to prepend a specified prefix to filenames within a given directory path. This node is particularly useful for organizing and categorizing files systematically, making it easier to identify and retrieve them later. By offering the option to include date and time stamps as either a prefix or postfix, it provides a flexible way to ensure filenames are unique and informative. This feature is especially beneficial for workflows that involve generating or processing multiple files, as it helps maintain a clear and consistent naming convention.
Add Filename Prefix [RvTools] Input Parameters:
path
This parameter specifies the directory path where the files are located. It is a required input and ensures that the node knows where to apply the filename prefix. The path must be a valid string representing the directory location.
file_name_prefix
This parameter allows you to define the prefix that will be added to the filenames. It is a required string input, with a default value of "image". This prefix helps in categorizing or identifying files based on their content or purpose.
add_date_time
This parameter determines whether a date and time stamp should be added to the filename and if so, whether it should be a prefix or postfix. The options are "disable", "prefix", and "postfix". This choice allows for additional customization of the filename, making it easier to track when files were created or modified.
date_time_format
This parameter specifies the format of the date and time stamp to be added to the filename. It is a string input with a default format of "%Y-%m-%d_%H:%M:%S". This format can be customized to suit your specific needs, ensuring that the date and time information is presented in a way that is most useful for your workflow.
input_variables
This optional parameter allows for additional variables to be included in the filename prefix. It accepts any type of input, providing flexibility to incorporate dynamic data into the filename structure.
Add Filename Prefix [RvTools] Output Parameters:
string
This output parameter returns the newly constructed file path with the added prefix and optional date and time stamp. It is a string that represents the full path to the file with its updated name, ensuring that the file can be easily accessed and identified within the directory.
Add Filename Prefix [RvTools] Usage Tips:
- To maintain a consistent naming convention, use the
file_name_prefixparameter to categorize files based on their content or purpose. - Utilize the
add_date_timeoption to automatically append timestamps to filenames, which can be particularly useful for version control or tracking file creation dates. - Customize the
date_time_formatto match your preferred date and time representation, ensuring that the information is clear and easily interpretable.
Add Filename Prefix [RvTools] Common Errors and Solutions:
Path is missing. Enter the Path to your Video Files.
- Explanation: This error occurs when the
pathparameter is not provided or is invalid. - Solution: Ensure that you specify a valid directory path where the files are located. Double-check the path string for any typos or incorrect directory names.
Invalid date_time_format
- Explanation: This error arises when the
date_time_formatdoes not conform to a valid date and time format string. - Solution: Verify that the
date_time_formatstring follows the correct syntax for date and time formatting. Refer to Python'sstrftimedocumentation for valid format codes.
