Recipe Organize Drive Folder

作者 googleworkspacea3768d0e82ad无许可证31K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Create a Google Drive folder structure and move files into the right locations.

AI 生成的概览

创建 Google Drive 文件夹结构,并将现有文件移动到正确的文件夹中。

功能
该配方演示如何搭建 Google Drive 文件夹层级:先创建顶层项目文件夹,再创建 Documents 等子文件夹。随后通过更新文件的父级引用,把现有文件移动到目标文件夹,最后列出文件夹内容以核对结构。它只是操作说明,不附带脚本。
适用场景
当需要为项目建立有条理的 Google Drive 文件夹结构,并把现有文件归入其中时使用。适合文件散落、需要按既定层级整理归类的清理或初始化场景。
运行要求
需要 gws 命令行工具,并预先加载 gws-drive 技能;还需要访问 Google Drive,并具备相关文件和文件夹 ID。不附带脚本。

Organize Files into Google Drive Folders

PREREQUISITE: Load the following skills to execute this recipe: gws-drive

Create a Google Drive folder structure and move files into the right locations.

Steps

  1. Create a project folder: gws drive files create --json '{"name": "Q2 Project", "mimeType": "application/vnd.google-apps.folder"}'
  2. Create sub-folders: gws drive files create --json '{"name": "Documents", "mimeType": "application/vnd.google-apps.folder", "parents": ["PARENT_FOLDER_ID"]}'
  3. Move existing files into folder: gws drive files update --params '{"fileId": "FILE_ID", "addParents": "FOLDER_ID", "removeParents": "OLD_PARENT_ID"}'
  4. Verify structure: gws drive files list --params '{"q": "FOLDER_ID in parents"}' --format table

来源与署名

来源:googleworkspace/cli位于skills/recipe-organize-drive-folder提交a3768d0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架