ComfyUI Node: splitext

Class Name

Basic data handling: PathSplitExt

Category
Basic/Path
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling 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

splitext Description

PathSplitExt node splits file paths into name and extension for efficient file management.

splitext:

The PathSplitExt node is designed to simplify the process of handling file paths by splitting a given path into two distinct components: the name of the file or directory and its extension. This node is particularly useful when you need to manipulate or analyze file paths, as it allows you to easily separate the core name from its extension, which includes the dot (e.g., .txt). By providing a straightforward method to extract these components, PathSplitExt helps streamline workflows that involve file management, ensuring that you can efficiently handle paths without manually parsing strings. This node is essential for tasks where understanding or modifying the file extension is necessary, such as when filtering files by type or preparing paths for further processing.

splitext Input Parameters:

path

The path parameter is a string input that represents the file or directory path you wish to split. This parameter is crucial as it determines the path from which the node will extract the name and extension components. The path can be any valid file or directory path, and it is important to ensure that it is correctly formatted to avoid errors. The default value for this parameter is an empty string, which means if no path is provided, the node will not perform any operation. There are no specific minimum or maximum values for this parameter, but it should be a valid path string to function correctly.

splitext Output Parameters:

path without ext

The path without ext output is a string that represents the original path minus its extension. This output is significant because it provides the core name of the file or directory, which can be used for further processing or analysis without the influence of the file type. It is particularly useful when you need to rename files or when the extension is irrelevant to your task.

extension

The extension output is a string that includes the file extension, starting with the dot (e.g., .txt). This output is essential for identifying the type of file or for operations that depend on the file extension, such as filtering files by type or preparing them for specific applications. If the input path does not have an extension, this output will be an empty string.

splitext Usage Tips:

  • Ensure that the path parameter is a valid and correctly formatted string to avoid unexpected results or errors.
  • Use the path without ext output when you need to manipulate or analyze the file name independently of its type.
  • Utilize the extension output to filter or categorize files based on their type, especially in workflows that involve handling multiple file formats.

splitext Common Errors and Solutions:

Invalid path format

  • Explanation: This error occurs when the provided path is not a valid string or is incorrectly formatted.
  • Solution: Double-check the path input to ensure it is a valid and correctly formatted string representing a file or directory path.

Empty path input

  • Explanation: If the path parameter is left empty, the node will not perform any operation, resulting in empty outputs.
  • Solution: Provide a valid path string to the path parameter to enable the node to function correctly and produce meaningful outputs.

splitext Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
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 Models, enabling artists to harness the latest AI tools to create incredible art.

splitext