Select Latest π₯π ₯π π ’(SelectLatest)
This node technically scans the file system to locate all files that start with `filename_prefix` and end with `filename_postfix`.
Select Latest
The Select Latest π₯π
₯π
π
’ node technically works by scanning the file system to find all files that start with filename_prefix and end with filename_postfix.
The Select Latest node is a utility tool within the Video Helper Suite. Its core function is to automatically find and return the path of the latest file that matches specified naming rules. By combining the user-provided prefix and suffix, it locates the most recent matching file in the file system, thereby simplifying the steps of manually finding and entering file paths in complex workflows.
Node Functionality
Technically, this node scans the file system to find all files that start with filename_prefix and end with filename_postfix. It sorts these files based on their modification timestamps, selects the newest one, and finally outputs its complete file path as a STRING. This avoids the need for users to manually remember or input lengthy and error-prone filenames.
Node Parameter Description - Select Latest π₯π ₯π π ’
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
filename_prefix | STRING | Yes | output/AnimateDiff | - | Specifies the beginning part of the filename to search for, used to match the prefix of the file path. |
filename_postfix | STRING | Yes | - | - | Specifies the ending part of the filename to search for, typically the file extension, used to match the suffix of the file path. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| Filename | STRING | Outputs the complete path string of the automatically found latest file. |
Usage Scenario
In a typical video processing workflow, for example, after generating a series of videos using AnimateDiff, you can connect this node to the path input of a node that needs to load the latest generated video (such as VHS_LoadVideo). This way, every time the workflow runs, the system will automatically load the most recently created video file without requiring manual path updates, achieving process automation.
Notes
Please note that this node is currently marked as "EXPERIMENTAL," and its behavior may change in future versions. It relies on the operating system's file system timestamps. Ensure the target directory exists and contains matching files; otherwise, it may fail to return a valid path.
Select Latest π₯π ₯π π ’ Node Source Code Link
The Select Latest π₯π ₯π π ’ node is from the ComfyUI-VideoHelperSuite node package.
Comments
Sign in with GitHub to join the discussion.