Overview
The Drive service provides access to Google Drive v3 API for managing files, folders, permissions, and shared drives. API:drive (v3)
Common Use Cases
- List and search files
- Upload and download files
- Manage permissions and sharing
- Organize files in folders
- Work with shared drives
Helper Commands
+upload
Upload a file with automatic metadata detection:
- Automatic MIME type detection
- Infers filename from local path
- Optional parent folder assignment
Command Examples
List Files
Example Response
Example Response
Get File Metadata
Example Response
Example Response
Create a File
Create empty file
Upload file with metadata
Create a Folder
Update File Metadata
Rename file
Move to folder
Delete a File
Move to trash
Permanent delete
Manage Permissions
Share with user
Share with domain
Make public
List permissions
Export Google Workspace Files
Export Doc as PDF
Export Sheet as CSV
Copy a File
Advanced Queries
Theq parameter supports powerful search operators:
Files modified after date
Files owned by user
Shared files
Starred files
Combine conditions
Resources
files- File and folder operationspermissions- Sharing and access controldrives- Shared drive managementcomments- File commentsreplies- Comment repliesrevisions- File version history
gws drive <resource> --help to see all available methods.
Related Commands
Sheets
Work with spreadsheet data
Docs
Edit document content