recipe-batch-rename-files

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Batch 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

步骤

  1. Find files to rename:
    gws drive files list --params '{"q": "name contains '\''Report'\''"}' --format table
  2. Rename a file:
    gws drive files update --params '{"fileId": "FILE_ID"}' --json '{"name": "2025-Q1 Report - Final"}'
  3. Verify the rename:
    gws drive files get --params '{"fileId": "FILE_ID", "fields": "name"}'
  1. 查找需要重命名的文件:
    gws drive files list --params '{"q": "name contains '\''Report'\''"}' --format table
  2. 重命名文件:
    gws drive files update --params '{"fileId": "FILE_ID"}' --json '{"name": "2025-Q1 Report - Final"}'
  3. 验证重命名结果:
    gws drive files get --params '{"fileId": "FILE_ID", "fields": "name"}'