Audio File Scanner 🎵
Audio File Scanner 🎵
- file_paths
- count
Point this at a folder, and it hands you back every audio file inside as a list of absolute paths, plus a count. It's the folder-crawling half of any pipeline that needs to batch through a pile of audio rather than dragging files in one at a time - the author's own description confirms exactly this: scan a folder, return the full list of paths.
Inputs and outputs that matter. folder_path is a plain string, and its tooltip is explicit that it wants an absolute path - worth taking seriously, since a relative path is a gamble on what ComfyUI's current working directory happens to be, which isn't always what you'd assume. audio_type is a two-choice dropdown: mp3 (default) restricts the scan to just .mp3 files, while all widens it to .mp3 .wav .flac .aac .m4a .ogg .opus .wma .aiff .ac3 - that full list comes straight from the field's own tooltip, not a guess. Two optional fields round it out: sort_method (numerical, alphabetical, or modified_time - how the returned list gets ordered) and recursive (off by default; flip it on to also crawl subfolders instead of just the top level).
Outputs are file_paths (a STRING list) and count (an INT).
Where it fits. This pairs naturally with MP3 Path → Audio, another node in the same pack - this one gives you the list of paths, that one turns each path into an actual AUDIO object you can wire into anything downstream that expects one. Between the two, you get the full path from "a folder full of audio files" to "something a downstream node can actually process," without needing a third-party file-browser node or hardcoding a single file path by hand.
Structurally, this node is close to identical to Folder File Scanner elsewhere in the same pack - same folder_path/sort_method/recursive shape, just swapped to an audio-specific extension list instead of image/video ones. If you've used one, the other needs no relearning.
Installing it. Search comfyui-huyl2-nodes in ComfyUI Manager, or clone the pack directly:
cd ComfyUI/custom_nodes
git clone https://github.com/huyl3-cpu/comfyui-sortlist
Restart ComfyUI.
Troubleshooting. If count comes back as 0, check two things before you assume folder_path is wrong: whether audio_type is still set to mp3 while your files are actually .wav or something else in that wider list, and whether recursive is off while your files actually live in subfolders rather than directly in the target folder. Those two account for the overwhelming majority of "it found nothing" cases with a folder scanner like this.
One smaller note on sort_method: numerical sorting expects your filenames to actually contain numbers it can sort by (like 01.mp3, 02.mp3). If your files are named non-numerically, you'll effectively get alphabetical ordering regardless of what you picked - not a bug, just the method falling back to what it can actually work with.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | Đường dẫn tuyệt đối đến thư mục cần quét | |
| audio_type | COMBO | mp3 | mp3: chỉ quét .mp3 all: .mp3 .wav .flac .aac .m4a .ogg .opus .wma .aiff .ac3 |
| sort_methodopt | COMBO | numerical | Cách sắp xếp: theo số, tên, hoặc thời gian sửa đổi |
| recursiveopt | BOOLEAN | false | True = quét cả thư mục con |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| file_paths | STRING | — |
| count | INT | — |