Visit ComfyUI Online for ready-to-use ComfyUI environment
Streamline file removal in specified directory by extension and prefix, automating deletion for organized storage space.
The BatchDeleteFiles| Batch Delete Files 🐑 node is designed to streamline the process of removing unwanted files from a specified directory. This node is particularly useful for managing large collections of files by allowing you to delete files based on their extension and an optional prefix. By automating the deletion process, it helps maintain an organized file system, freeing up storage space and reducing clutter. The node is capable of handling various file types, making it versatile for different use cases, such as cleaning up temporary files, removing outdated documents, or managing media libraries. Its primary goal is to provide a simple yet effective solution for batch file deletion, ensuring that only the files you specify are removed, thus minimizing the risk of accidental data loss.
The directory parameter specifies the path to the folder where the files you want to delete are located. This parameter is crucial as it defines the scope of the deletion operation. The node will only search for and delete files within this directory. There are no specific minimum or maximum values for this parameter, but it must be a valid directory path on your system.
The file_extension parameter determines the type of files to be deleted by specifying their extension, such as .jpg or .txt. This parameter is essential for targeting specific file types, ensuring that only files with the given extension are considered for deletion. There are no default values, and it must be a valid file extension.
The prefix parameter is optional and allows you to further refine the deletion criteria by specifying a prefix that the file names should start with. This is useful for deleting files that follow a particular naming convention. If no prefix is provided, the node will consider all files with the specified extension. There are no default values, and it can be an empty string if not needed.
The trigger_signal parameter is optional and can be used to initiate the deletion process based on an external event or condition. This parameter is not mandatory for the node to function, and its use depends on the specific requirements of your workflow.
The deleted_count output parameter provides the number of files that were successfully deleted during the operation. This count is useful for verifying the effectiveness of the deletion process and ensuring that the intended files were removed.
The log_message output parameter offers a detailed log of the deletion operation, including the number of files deleted and the directory from which they were removed. This log is valuable for record-keeping and troubleshooting, as it provides a timestamped account of the action taken.
directory path is correct and accessible to avoid errors during the deletion process.file_extension and prefix parameters to precisely target the files you want to delete, minimizing the risk of accidental data loss.trigger_signal parameter to automate the deletion process as part of a larger workflow, such as cleaning up temporary files after a batch processing task.directory path is correct and that you have the necessary permissions to access it.file_extension parameter is not a valid file extension format.file_extension is correctly formatted, starting with a dot (e.g., .txt, .jpg).file_extension and prefix criteria.file_extension and prefix parameters to ensure they match the files you intend to delete.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.