06 Document File Browser
Browse your disk from inside ComfyUI and hand files to your workflow
- file_path
- file_path_link
- filename
- filename_link
- content_type
- size_bytes
- exists
- browser_root
- refresh
- file_paths
- filenames
- indexed_file_paths
- discovered_count
- status
- selectable_items
- indexed_items
- item_count
Every document pipeline starts the same way: you have files on disk and you need to get their paths into the graph. "06 Document File Browser" is the node that does that - it scans a folder on the machine running ComfyUI, filters by extension and name, and hands you a path (plus a whole batch of them as a list) ready for Ingest, Upload, or anything else that wants a file_path_link. The display name says "File Browser" and it's exactly that, but the useful part is that it's batch-aware: it's built to feed streaming pipelines, not just one file at a time.
How it works
Pick a root_mode from the dropdown: Documents, Comfy Input (the standard input folder), Home, Current Working Directory, Filesystem Root, or Custom Root (where you fill in custom_root). Then:
recursive(defaulttrue) - descend into subfoldersextensions(default.pdf,.docx,.txt,.md,.csv,.json,.log,.rtf) - comma/space-separated;*means all filessearch_text- optional case-insensitive filename/path filtermax_results(default 500, up to 10k) andmax_depth(default 6, up to 25) - cap the scan so you don't walk your whole home directoryinclude_hidden(defaultfalse) - the scanner also skips.git,node_modules,venv-style dirs, and system folders out of the box, which keeps scans sane
The single-file outputs - file_path, filename, content_type, size_bytes, exists, browser_root - describe the currently selected file (use selected_file dropdown or manual_path to pick it). But for pipelines, the list outputs are the real deal: file_paths and filenames as lists, discovered_count, indexed_file_paths (numbered), plus the standard selectable tail. And there are typed links - file_path_link and filename_link - which are what you wire into "06 Ingest Text PDF / DOCX" or "06 Upload Document File" so the file travels around the graph with its identity intact.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
Restart ComfyUI, or install "ComfyUI-ZMongo" via ComfyUI Manager. The README's minimal deps (pymupdf, python-docx, requests, python-dotenv) cover this node; the heavier requirements.txt extras are only needed if you use the embedding/agent features.
Where people get burned
The single biggest confusion: paths are resolved on the ComfyUI machine, not your browser. If ComfyUI runs on a remote box and you browse your laptop's files, the node won't find them. The error payloads hammer this point for a reason - "must exist on the machine running ComfyUI."
Second, a directory is not a file. This node's file_path outputs point at files (or the browser root when nothing's selected). If you wire browser_root into an Upload or Ingest node expecting it to "just handle the folder," you'll get a clean "that's a directory" rejection. Select a real file.
And third: with recursive on and a big tree, you can hit max_results (500) quickly and think the scan found nothing weird - you just hit the cap. Raise it or narrow extensions/search_text. Watch discovered_count and you'll see it coming.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| root_mode | COMBO | Documents | 6 options: Documents, Comfy Input, Home, Current Working Directory, Filesystem Root, Custom Root |
| selected_file | COMBO | 1 options: | |
| manual_path | STRING | — | |
| custom_root | STRING | — | |
| recursive | BOOLEAN | true | — |
| extensions | STRING | .pdf,.docx,.txt,.md,.csv,.json,.log,.rtf | Comma/space-separated extensions. Use * for all files. |
| search_text | STRING | Optional case-insensitive filename/path filter. | |
| max_results | INT | 5001–10000 | — |
| max_depth | INT | 60–25 | — |
| include_hidden | BOOLEAN | false | — |
| refresh_tokenopt | STRING | — |
Outputs (17)
| Name | Type | Description |
|---|---|---|
| file_path | STRING | — |
| file_path_link | ZMONGO_FILE_PATH | — |
| filename | STRING | — |
| filename_link | ZMONGO_FILENAME | — |
| content_type | STRING | — |
| size_bytes | INT | — |
| exists | BOOLEAN | — |
| browser_root | STRING | — |
| refresh | STRING | — |
| file_paths | * | — |
| filenames | * | — |
| indexed_file_paths | STRING | — |
| discovered_count | INT | — |
| status | STRING | — |
| selectable_items | * | — |
| indexed_items | STRING | — |
| item_count | INT | — |