Visit ComfyUI Online for ready-to-use ComfyUI environment
Retrieve detailed file metadata efficiently with pattern-based filtering and hash computation for file system management and analysis.
The GetDirectoryFilesInfo| Get Directory Files Info 🐑
node is designed to provide comprehensive information about files within a specified directory. This node is particularly useful for users who need to gather detailed metadata about files, such as their size, creation and modification times, and hash values. By leveraging this node, you can efficiently scan directories and retrieve structured data about each file, which can be crucial for tasks like file management, auditing, or data analysis. The node's ability to filter files based on patterns and compute hashes using various algorithms adds flexibility and precision to its functionality, making it a valuable tool for managing and analyzing file systems.
The directory_path
parameter specifies the path to the directory you want to scan for files. It is a string input that determines the root directory from which the node will begin its search. The default value is "input/abc"
, but you can set it to any valid directory path. This parameter is crucial as it defines the scope of the file information retrieval process.
The hash_algorithm
parameter allows you to choose the hashing algorithm used to compute the hash of each file in the directory. The available options are "md5"
, "sha1"
, "sha256"
, and "None"
, with the default being "None"
. Selecting a hash algorithm enables the node to generate a unique hash for each file, which can be useful for verifying file integrity or detecting duplicates.
The pattern
parameter is a string that specifies a file name pattern to filter the files within the directory. By default, it is set to "*"
, which means all files will be included. You can modify this pattern to match specific file types or names, allowing for more targeted file information retrieval.
The directory_files_info
output parameter is a JSON-formatted string that contains detailed information about each file in the specified directory. This includes the file path, size, creation and modification times, and hash value (if a hash algorithm is selected). This output is essential for users who need a structured overview of the files in a directory, enabling them to analyze or process the data further.
pattern
parameter to filter files by type, such as "*.txt"
for text files, to streamline the information retrieval process.hash_algorithm
based on your needs; for instance, use "sha256"
for higher security requirements when verifying file integrity.directory_path
is correctly set to avoid errors related to non-existent directories.{"error": "No such file or directory"}
directory_path
does not exist or is incorrect.directory_path
is correct and that the directory exists on your file system.{"error": "Permission denied"}
{"error": "Invalid hash algorithm"}
hash_algorithm
parameter is set to one of the supported options: "md5"
, "sha1"
, "sha256"
, or "None"
.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.