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 從公開儲存庫中收錄這些內容。

檢舉或申請下架