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

Add Suffix to File Names

by CoderWanFeng

Batch add a specified suffix to file names using a Python function. Useful for versioning, organizing, or processing files in bulk.

1.3K stars297 forksAdded 2026/07/20
officepippypipythonweixin

Documentation

README

file_name_add_postfix Skill

批量重命名:给文件名增加后缀

功能描述

给指定文件的文件名增加指定的后缀。

所属分类

office/skills/file/file_name_add_postfix/

调用方式

from office.skills.file import file_name_add_postfix

file_name_add_postfix(
    file_path='./test.txt',
    postfix_content='_backup'
)

参数说明

参数 类型 必填 默认值 说明
file_path str - 文件路径
postfix_content str - 后缀内容

返回值

None

使用示例

from office.skills.file import file_name_add_postfix
file_name_add_postfix(file_path='./data.txt', postfix_content='_v1')

原始函数

office.api.file.file_name_add_postfix