# Google Drive File Organizer

> Stop scrolling through pages of search results to find the right file. AI scans your Drive, spots duplicates and stale files, and tells you exactly what to clean up.

Source: https://cotera.co/solutions/ops/google-workspace-drive-file-organizer

---

- **Team:** Operations
- **Tools:** Google Workspace
- **Difficulty:** easy
- **Setup time:** 5 min
- **Time saved:** 20 min/week

## How it works
1. **Scan Drive** — Lists files in a specified folder or across your entire Drive
2. **Analyze Files** — Reads metadata including last modified date, owner, and size
3. **Identify Issues** — Finds duplicates, stale files, and orphaned documents
4. **Generate Report** — Produces an organized inventory with cleanup recommendations

## Example requests
- Audit my 'Projects' folder for stale files
- Find all documents not modified in the last 6 months
- List the 20 largest files in my Drive

## Prompt

```markdown
## Task

Scan the user's Google Drive for files in a specified folder or matching a search query. Analyze file metadata and generate an audit report with cleanup recommendations.

## Input

The user will specify a folder to scan, a search query, or ask for a general Drive audit. They may also set thresholds (e.g., "files not touched in 6 months").

**Example:** "Audit my 'Projects' folder for stale files" or "Find all documents not modified in the last 6 months"

## Context

### Strategy

1. Use @Google Workspace/Drive - List Files to scan files in the specified folder or matching the search query
2. For each file, use @Google Workspace/Drive - Get File to retrieve detailed metadata:
   - File name and type
   - Last modified date
   - File size
   - Owner
   - Sharing status
3. Analyze the file inventory for issues:
   - **Stale files:** Not modified in 90+ days (or user-specified threshold)
   - **Potential duplicates:** Files with similar names in the same or related folders
   - **Large files:** Files consuming significant storage
   - **Orphaned docs:** Files shared by people no longer in the organization
4. Generate an organized audit report with actionable recommendations

### Analysis Categories

- **Archive Candidates:** Files not modified in 90+ days that are unlikely to be needed
- **Duplicate Check:** Files with identical or near-identical names (e.g., "Report v2", "Report v2 copy", "Report v2 (1)")
- **Storage Hogs:** Top files by size, especially those not recently accessed
- **Sharing Audit:** Files shared externally or with broad permissions
- **Naming Issues:** Files with unclear names that should be renamed for findability

### Thresholds (Default)

- Stale: Not modified in 90+ days
- Large: Files over 10 MB
- Duplicate: Names with 80%+ similarity in the same parent folder

## Output

A Drive audit report containing:
- **Summary stats:** Total files scanned, total storage used, files by type
- **Stale files list:** Files not modified in 90+ days with last modified dates
- **Potential duplicates:** Groups of similar-named files with recommendations
- **Large files:** Top 10 files by size with last access dates
- **Recommendations:** Specific files to archive, rename, or delete
```

## Related reading
- [How to Automate Google Slides Presentations with AI](https://cotera.co/articles/automate-google-slides-with-ai.md)

