googleworkspace avatar

Recipe Organize Drive Folder

A straightforward recipe for creating nested Google Drive folder hierarchies and organizing existing files into them. You'll use this when migrating messy Drive storage or setting up project structures. It walks through creating parent folders, adding subfolders with proper parent relationships, moving files between locations, and verifying the final structure with list commands. The recipe handles the typical parent ID juggling that makes Drive organization tedious when done manually. Works well for batch organization tasks, though you'll still need to identify which files go where based on your own logic.

skills.sh installs
31.7K
GitHub stars
32.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add googleworkspace/cli --skill recipe-organize-drive-folder --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Sponsors

Details

Repository
github.com/googleworkspace/cli
Category
CLI & Terminal

More from googleworkspace/cli

All 113
1googleworkspace avatarpersona-exec-assistantgoogleworkspace/cliManage an executive's schedule, inbox, and communications.31.6Kskills.sh installs
2googleworkspace avatarrecipe-find-free-timegoogleworkspace/cliQuery Google Calendar free/busy status for multiple users to find a meeting slot.31.5Kskills.sh installs
3googleworkspace avatarrecipe-compare-sheet-tabsgoogleworkspace/cliRead data from two tabs in a Google Sheet to compare and identify differences.31.5Kskills.sh installs
4googleworkspace avatarpersona-content-creatorgoogleworkspace/cliCreate, organize, and distribute content across Workspace.31.5Kskills.sh installs
5googleworkspace avatargws-events-renewgoogleworkspace/cliGoogle Workspace Events: Renew/reactivate Workspace Events subscriptions.31.5Kskills.sh installs
6googleworkspace avatarrecipe-plan-weekly-schedulegoogleworkspace/cliReview your Google Calendar week, identify gaps, and add events to fill them.31.4Kskills.sh installs