Nodes/ComfyUI-YogurtNodes/Glob Files (Yogurt Nodes)
ComfyUI Node

Glob Files (Yogurt Nodes)

Use glob pattern to traverse the folder, return the matching file path list

By yogurt7771·Created 2 years ago·Updated 2 months ago· 0
Glob Files (Yogurt Nodes)
    • file_paths
    root_directory
    glob_pattern*
    sort_filesfalse
    sort_reversefalse
    glob_modeglob
    files_onlyfalse
    as_posixfalse
    full_pathfalse
    resolve_pathfalse
    prefix_list
    suffix_list
    extension_list
    extension_is_imagefalse
    relativefalse
    CategoryYogurtNodes/IO

    Inputs (14)

    NameTypeDefaultDescription
    root_directorySTRINGRoot directory path, from which to start searching for files.
    glob_patternSTRING*One glob pattern per line, e.g. '*.txt' or '**/*.py'. Empty lines are ignored.
    sort_filesBOOLEANfalseSort the file paths in alphabetical order.
    sort_reverseBOOLEANfalseSort in descending order.
    glob_modeCOMBOglobglob from left to right, rglob from right to left
    files_onlyBOOLEANfalseReturn only files, exclude directories.
    as_posixBOOLEANfalseConvert the path to a POSIX format.
    full_pathBOOLEANfalseReturn an absolute version of this path by prepending the current working directory. No normalization or symlink resolution is performed.
    resolve_pathBOOLEANfalseMake the path absolute, resolving all symlinks on the way and also normalizing it.
    prefix_listSTRINGPrefix list, multiple prefixes separated by commas, e.g. 'pre-1,pre-2,pre-3' etc. Case insensitive. If empty, all files will be returned.
    suffix_listSTRINGSuffix list, multiple suffixes separated by commas, e.g. 'txt,py,json' etc. Case insensitive. If empty, all files will be returned.
    extension_listSTRINGExtension list, multiple extensions separated by commas, e.g. 'txt,py,json' etc. Case insensitive. If empty, all files will be returned.
    extension_is_imageBOOLEANfalseIf true, the extension list will be treated as image extensions.
    relativeBOOLEANfalseReturn paths relative to the root directory.

    Outputs (1)

    NameTypeDescription
    file_pathsLIST