Install in seconds
Install this skill
Copy the command and run it in your terminal. You can review the source before installing.
terminal
git clone https://github.com/CoderWanFeng/python-office

Works with Git. The repository opens in your current directory.

🔍
AutomationPython

Search Files by Type

by CoderWanFeng

Searches for files of a specified type (like .txt or .pdf) in a given directory path. Useful when you need to locate all files of a certain format.

1.3K stars297 forksAdded 2026/07/20
officepippypipythonweixin

Documentation

README

search_specify_type_file Skill

在当前路径下搜索指定类型的文件

功能描述

在指定路径下搜索指定类型的文件。

所属分类

office/skills/file/search_specify_type_file/

调用方式

from office.skills.file import search_specify_type_file

search_specify_type_file(
    file_path='./data',
    file_type='.txt'
)

参数说明

参数 类型 必填 默认值 说明
file_path str - 文件路径
file_type str - 文件类型(如 .txt.py

返回值

None(结果直接打印输出)

使用示例

from office.skills.file import search_specify_type_file
search_specify_type_file(file_path='./docs', file_type='.pdf')

原始函数

office.api.file.search_specify_type_file