ComfyUI > Nodes > ComfyUI_CGAnimittaTools > CGA_ListSubfolders

ComfyUI Node: CGA_ListSubfolders

Class Name

CGA_ListSubfolders

Category
custom
Author
CGAnimitta (Account age: 898days)
Extension
ComfyUI_CGAnimittaTools
Latest Updated
2025-04-11
Github Stars
0.04K

How to Install ComfyUI_CGAnimittaTools

Install this extension via the ComfyUI Manager by searching for ComfyUI_CGAnimittaTools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_CGAnimittaTools 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

CGA_ListSubfolders Description

Streamlines directory exploration by listing subfolders, aiding AI artists in asset organization and management efficiently.

CGA_ListSubfolders:

The CGA_ListSubfolders node is designed to streamline the process of exploring directory structures by listing all subfolders within a specified directory. This node is particularly useful for AI artists who need to manage and organize large collections of assets, such as images, models, or other resources, by providing a clear overview of the directory's subfolder hierarchy. By automating the retrieval of subfolder paths, the node saves time and reduces the potential for errors that can occur when manually navigating complex folder structures. Its primary function is to return a list of subfolder paths, the count of these subfolders, and the name of the main folder, making it an essential tool for efficient file management and organization in creative workflows.

CGA_ListSubfolders Input Parameters:

folder_path

The folder_path parameter is a string input that specifies the directory path you wish to explore. This parameter is crucial as it determines the root directory from which the node will list all subfolders. The input should be a valid directory path on your system. If the path is incorrect or does not exist, the node will not be able to perform its function. There are no specific minimum or maximum values for this parameter, but it should be a valid path string. The default value is an empty string, which means you need to provide a valid path for the node to operate correctly.

CGA_ListSubfolders Output Parameters:

subfolders

The subfolders output is a list of strings, each representing the full path of a subfolder within the specified folder_path. This output is essential for users who need to access or manage the contents of these subfolders, as it provides a comprehensive list of all subdirectories found in the given directory.

subfolder_count

The subfolder_count output is an integer that indicates the total number of subfolders found within the specified folder_path. This output is useful for quickly assessing the size and complexity of the directory structure, allowing users to understand how many subdirectories they are dealing with.

folder_name

The folder_name output is a string that represents the name of the main folder specified in the folder_path. This output helps users identify the root directory being analyzed, providing context for the list of subfolders and their count.

CGA_ListSubfolders Usage Tips:

  • Ensure that the folder_path you provide is correct and accessible to avoid errors and ensure accurate results.
  • Use the subfolder_count output to quickly gauge the number of subdirectories, which can help in planning further actions or organizing tasks.
  • Utilize the subfolders list to automate tasks such as batch processing files within each subdirectory, saving time and effort.

CGA_ListSubfolders Common Errors and Solutions:

Invalid folder path

  • Explanation: This error occurs when the specified folder_path does not exist or is not a valid directory.
  • Solution: Double-check the path for typos or errors, and ensure that the directory exists on your system.

Permission denied

  • Explanation: This error happens when the node does not have the necessary permissions to access the specified directory.
  • Solution: Ensure that you have the appropriate permissions to access the directory, or try running the application with elevated privileges.

No subfolders found

  • Explanation: This message indicates that the specified directory does not contain any subfolders.
  • Solution: Verify that the directory is correct and contains subdirectories. If not, consider selecting a different directory that meets your needs.

CGA_ListSubfolders Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_CGAnimittaTools
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.