Nodes/comfyui-oli-prompt-tools/Sanitize Filename (Oli)
ComfyUI Node

Sanitize Filename (Oli)

A ComfyUI node in Oli/utils with 8 inputs and 3 outputs.

By magicoli·Created 6 months ago·Updated 5 months ago· 0
Sanitize Filename (Oli)
    • prefix
    • path
    • filename
    filename
    folder
    extension
    allow_spacestrue
    allow_slashtrue
    allow_unicodefalse
    max_length240
    replacement_
    CategoryOli/utils

    Inputs (8)

    NameTypeDefaultDescription
    filenameoptSTRINGThe filename to sanitize.
    folderoptSTRINGThe folder path to sanitize.
    extensionoptSTRINGFile extension (with or without leading dot).
    allow_spacesoptBOOLEANtrue
    allow_slashoptBOOLEANtruePreserve / as path separator in the filename input.
    allow_unicodeoptBOOLEANfalseIf disabled, diacritics are transliterated via NFKD: à→a, é→e, ü→u, etc.
    max_lengthoptINT2400–4096Max bytes for the filename component (0 = no limit). Default 240 leaves room for the counter and extension that save nodes typically append. OS limit is 255 bytes.
    replacementoptSTRING_Character used in place of disallowed characters. Must be a single non-alphanumeric ASCII character; invalid values fall back to _.

    Outputs (3)

    NameTypeDescription
    prefixSTRING
    pathSTRING
    filenameSTRING