Files
1hew-ComfyUI-1hewNodes/web/docs/1hew_GetFileCount/zh.md
T

25 lines
959 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Get File Count - 获取文件数量
**节点功能:** 统计文件夹中指定类型(图像或视频)的文件数量。
## 输入
| 参数名称 | 入端选择 | 数据类型 | 默认值 | 取值范围 | 描述 |
| -------- | -------- | -------- | ------ | -------- | ---- |
| `folder` | - | STRING | "" | - | 要检查的文件夹绝对路径。 |
| `type` | - | COMBO | "image" | "image" / "video" | 要统计的文件类型。 |
| `include_subfolder` | - | BOOLEAN | True | - | 是否搜索子文件夹。 |
## 输出
| 输出名称 | 数据类型 | 描述 |
|---------|----------|------|
| `count` | INT | 找到的匹配文件总数。 |
## 功能说明
- **格式过滤**:根据选择的类型统计文件:
- **图像 (Image)**:`.png`, `.jpg`, `.jpeg`, `.bmp`, `.tiff`, `.webp`
- **视频 (Video)**:`.webm`, `.mp4`, `.mkv`, `.gif`, `.mov`, `.avi`
- **用途**:适用于遍历数据集或在处理前验证文件夹内容。