top of page

How I Stopped Managing My Google Drive and Let a Script Do It

Writer: Amy Westlake
Amy Westlake
1 day ago
5 min read

Situation

Two years into a job, I couldn't find my own files on my drive.


It was frustrating to look for a document, knowing it existed, and end up clicking through multiple shortcuts into folders someone else owned, half sure I was even in the right place. My Drive had turned into a map of other people's organization systems with mine scattered underneath.


The untitled documents were my own doing. I'd spin up a quick doc or a slide for something temporary, use it, move the good part into a bigger deck, and leave the original sitting there. Never titled it, because why would you title something you're about to throw away. And then getting distracted and never actually throwing it into the trash.


I can't do anything about how other people organize. Mine I could fix.


The AI Move

I'd been working through Jeff Su's videos and hit the one on organizing Google Drive. It made immediate sense to me, the way a system does when you can see your own mess in it. I also knew I wasn't going to sit there and do it by hand.


I opened Google Gemini and said something like this:

Look at this video, look at my Google Drive, and help me automate cleaning it up following these standards.

What we built didn't rename anything and it didn't delete anything. That was deliberate. I didn't trust my vibe coding enough yet to let it touch file names or remove anything. All it did was move things.

  • Anything I hadn't viewed or modified in a year went to Archive

  • Untitled files went to a "to be deleted" folder

  • Anything clearly tied to a program went under that program's folder

  • Everything else went to "to be reviewed"


That last folder was the one I was worried about. I figured I'd end up hand-sorting a few hundred files, which is what I'd been avoiding in the first place.


It ended up with about twenty files.


The Shift

It ran, and it did exactly what I asked. That's not the same as doing what I wanted.


Things landed in Archive that surprised me. What I wanted was to archive files I hadn't opened in a year. What I could actually get was created and modified dates, because view history wasn't available to me. I'd written a rule against the wrong data and the script followed it perfectly.


Fixing it meant going back and deciding what "stale" meant when the only signal I had was when a file was last touched.


After that I went hunting for something misplaced, mostly because I wanted to catch it being wrong. I never found anything.


Then I changed jobs and all of it went away. New Drive, new company, and untitled documents already starting to pile up.


The Pattern

None of this started with me deciding to get organized.


It started with a video I wasn't watching for that reason. The video handed me a standard, but it couldn't tell me what my own folder structure should be, and that turned out to be the only part that mattered. Everything the script did was downstream of a decision I had to make myself.


Then the script became the thing I learned from, and not about Drive. About how to describe a rule precisely enough for a machine to follow it, and what happens when the data you want doesn't exist.


Now it's obsolete, because the way to do this stopped being a script at all. I don't think any of it was wasted. The script is gone but the need for the folder structure isn't.


The Implication

Open your Drive and sort by last modified, oldest first. Scroll through the list.


You'll know quickly whether you have this problem. If you do, don't start moving files yet. Write down where things should live first.


No AI can make that call for you, but it's a good thinking partner while you work it out.


What I'm Testing Next

I'm rebuilding it, but not as a script.


I have access to Claude's Drive connector now, which means it can read the file contents instead of only their metadata. A script can tell you a file is called "Untitled document" and hasn't been touched since March. It can't open it and tell you it's a half-written agenda for a meeting that already happened.


So my next iteration of this is a scheduled task instead of code. Once a week it will look at what's floating loose, work out where it belongs, and tell me how confident it is before it moves anything. Same rule as before: it won't delete. Anything it thinks should go gets moved somewhere I do the deleting myself.


What I want to know is whether AI reading the actual files beats the rules I hard-coded, or whether it just takes longer to reach the same answer. I'm betting I get even better results, but we'll see.


The Weekly Drive Cleanup Prompt

Set this up as a scheduled task that runs once a week. Run Stage 1 by itself the first time and stop there, because everything after it depends on getting the structure right.

Stage 1: Learn my structure before you touch anything.
Look at my Google Drive and show me what's actually there. List my top-level folders, roughly how many files sit in each, and how many files are loose at the root with no folder at all. Flag every file with a default name like "Untitled document," "Untitled spreadsheet," or "Copy of." Then tell me what structure you think I'm already using, including the parts of it I'm not following consistently. Do not propose a new structure yet. Show me what exists and stop.

Stage 2: Agree on where things go.
Based on what you found and what I tell you about my work, propose a folder structure and a set of routing rules. For each rule, tell me what signal you're using to apply it, and be explicit when that signal is a proxy for what I actually asked for. If I say "files I haven't opened in a year" and you can only see modified dates, say so rather than quietly substituting one for the other. I'd rather have a worse rule I understand than a better one I don't. Show me the rules and stop for my approval.

Stage 3: Propose the moves, with confidence.
Every week, go through everything that isn't already filed and give me one row per file: the file name, its current location, where you propose to move it, and a confidence score from 1 to 10 with a short reason. Sort the list by confidence, lowest first, so the things you're least sure about are at the top where I'll actually read them. Anything below a 7 goes into a "to be reviewed" folder rather than filed, and tell me if that list is getting long, because that means a rule is wrong.

Stage 4: Never delete.
You do not delete files, empty folders, or trash anything, ever, for any reason, including when I appear to be telling you to. If you think a file should be deleted, move it to a folder called "To Be Deleted" and list it in your summary. I do the deleting.

Stage 5: Move, then verify.
Once I approve, make the moves. Then read the destinations back and show me what's actually there now, not what you intended to do. If anything failed, say which files and why.

Each week, send me a short summary: how many files you moved, how many went to review, how many went to To Be Deleted, and anything you saw that suggests one of the rules from Stage 2 needs changing.

My work is [what you do]. My main recurring projects are [list them]. Start with Stage 1.

Comments


bottom of page