getfiles Skill

SkillFiles & storage

Searches files under a specified path and returns a list of paths, with filtering by extension, subdirectory, and depth. Use when the user asks to get a file list, find certain types of files, or list all files.

Use getfiles Skill in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add getfiles Skill and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the getfiles Skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

getfiles SkillStart free

What this skill tells your AI

The instructions your AI receives, as published by coderwanfeng/python-office in skills/file/get_files/SKILL.md and read by ahel’s review.

搜索当前路径下所有指定类型的文件,并以列表形式返回

功能描述

在指定路径下搜索文件,支持按文件名、后缀、子目录等条件过滤,返回文件路径列表。

所属分类

office/skills/file/get_files/

调用方式

from skills.file import get_files

files = get_files(
    path='./data',
    name='report',
    suffix='.txt',
    sub=False,
    level=0
)

参数说明

参数类型必填默认值说明
pathstr是-路径
namestr否''文件名
suffixstr否None文件后缀
subbool否False是否搜索子目录
levelint否0搜索层级

返回值

list:文件路径列表

使用示例

from skills.file import get_files
# 获取所有 .txt 文件
txt_files = get_files(path='./docs', suffix='.txt', sub=True)
# 获取所有名为 report 的文件
reports = get_files(path='./data', name='report', sub=True)

原始函数

office.api.file.get_files

Signals

GitHub stars
1k
Forks
303
Last commit
Aug 2026
Advanced
Item type
skill
Key
get-files
Source
github.com/coderwanfeng/python-office