G

Gws Drive Action

Production-ready command that handles google, drive, manage, files. Includes structured workflows, validation checks, and reusable patterns for google workspace.

CommandClipticsgoogle workspacev1.0.0MIT
0 views0 copies

GWS Drive Action

Advanced Google Drive operations for file management, bulk operations, and Drive administration.

When to Use This Command

Run this command when you need to:

  • Perform bulk file operations like moving, copying, or deleting multiple files matching a pattern
  • Manage Shared Drive creation, settings, and membership for team collaboration
  • Execute advanced Drive operations like file versioning, trash management, or quota analysis

Consider alternatives when:

  • You need to do a single quick file search or download where the instant command is faster
  • You are managing Drive Labels and classification which requires the Drive Labels API specifically

Quick Start

Configuration

name: gws-drive-action type: command category: google-workspace

Example Invocation

claude command:run gws-drive-action --action bulk-move --source "old-project/" --dest "archive/2025/"

Example Output

Executing bulk file operation...
  Action: move files
  Source: old-project/ (folder ID: 0B1a2b3c)
  Destination: archive/2025/ (folder ID: 0D4e5f6g)

Scanning source folder...
  Files found: 34
  Total size: 2.8 GB
  Types: 12 docs, 8 sheets, 6 slides, 5 PDFs, 3 images

Moving files...
  [========================================] 34/34 complete

Move summary:
  Moved: 34 files
  Failed: 0
  Total transferred: 2.8 GB
  Source folder: now empty (delete with --cleanup)

Core Concepts

Advanced Drive Operations Overview

AspectDetails
Bulk OperationsMove, copy, delete, or share multiple files in a single command
Shared DrivesCreate, configure, manage membership and permissions for team drives
VersioningList, restore, or purge file version history to manage storage
TrashManage trashed files: list, restore, permanently delete, or empty trash
QuotaAnalyze storage usage by user, folder, or file type across the domain

Bulk Operation Workflow

Define Operation
       |
       v
Scan Target Files
  (apply filters)
       |
       v
Preview Changes
  (dry-run mode)
       |
       v
Confirm Execution
       |
       v
Process Files
  [progress bar]
       |
       v
Generate Report
  (success/failure counts)

Configuration

ParameterTypeDefaultDescription
actionstring(required)Operation: bulk-move, bulk-copy, bulk-delete, shared-drive, quota
sourcestring(none)Source folder path or ID for bulk operations
deststring(none)Destination folder path or ID for move and copy
filterstring*File filter pattern: *.pdf, type:document, older:90days
cleanupbooleanfalseDelete empty source folders after moving all contents

Best Practices

  1. Always preview with dry-run - Bulk operations on hundreds of files are difficult to undo. Run with --dry-run first to see exactly which files will be affected before executing.

  2. Filter precisely for bulk deletes - Combine multiple filters like type and date to target exactly the files you want. A broad delete pattern can remove files you did not intend to lose.

  3. Monitor storage quotas proactively - Use the quota action monthly to identify storage hogs. Large video files and abandoned shared drives often consume significant quota unnoticed.

  4. Back up before bulk operations - For irreversible operations like permanent deletion, ensure you have backups or at minimum export the file list for reference.

Common Issues

  1. Bulk move times out on large folders - Folders with thousands of files may exceed API rate limits. Use the batch-size parameter to process files in smaller groups with delays between batches.

  2. Shared Drive creation requires admin - Only Google Workspace admins can create new Shared Drives. Regular users receive a permission error even if their license supports Shared Drives.

  3. Files in trash still count toward quota - Trashed files continue consuming storage until permanently deleted. Use the trash action to empty trash and reclaim storage space. Schedule periodic trash cleanups as part of your domain storage management routine to prevent quota from filling up unexpectedly.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates