recipe-batch-rename-files
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBatch Rename Google Drive Files
批量重命名Google Drive文件
PREREQUISITE: Load the following skills to execute this recipe:gws-drive
Rename multiple Google Drive files matching a pattern to follow a consistent naming convention.
前置要求: 加载以下技能以执行此方案:gws-drive
批量重命名符合指定规则的Google Drive文件,使其遵循统一的命名规范。
Steps
步骤
- Find files to rename:
gws drive files list --params '{"q": "name contains '\''Report'\''"}' --format table - Rename a file:
gws drive files update --params '{"fileId": "FILE_ID"}' --json '{"name": "2025-Q1 Report - Final"}' - Verify the rename:
gws drive files get --params '{"fileId": "FILE_ID", "fields": "name"}'
- 查找需要重命名的文件:
gws drive files list --params '{"q": "name contains '\''Report'\''"}' --format table - 重命名文件:
gws drive files update --params '{"fileId": "FILE_ID"}' --json '{"name": "2025-Q1 Report - Final"}' - 验证重命名结果:
gws drive files get --params '{"fileId": "FILE_ID", "fields": "name"}'