Rename PDF Files Based on Their Content
Scan_20260314_0043.pdf, Scan_20260314_0044.pdf, and eighty more like them. The information that should be in each name is printed right there on the first page.
15 min · Operations
Works in Web app · Chrome extension beside Google Drive, OneDrive, SharePoint and Dropbox · iPhone and Android · Claude · ChatGPT
The short answer
Ask The Drive AI to rename the folder and say what each name should contain, for example date first, then the document type, then who it is from. The agent reads every file, pulls those details out into a table, and proposes the new names as one change, with no flow to build. You see every old and new name before anything is renamed, and the renames can be undone together.
Ask it
What you type, and what comes back
Rename every PDF in my Google Drive Scans folder from what is written in it: date first, then the document type, then who it is from, like 2026-03-14-invoice-acme.pdf. Show me the new names before renaming anything.

Step by step
- 1
List
Lists the Scans folder
- 2
Read
Reads every PDF into a table: date, document type, sender
- 3
Propose
Proposes every new name as one change, for your go-ahead
What comes back
Read 86 PDFs in Scans.
Proposed 86 renames:
Scan_20260314_0043.pdf -> 2026-03-14-invoice-acme.pdf
Scan_20260314_0044.pdf -> 2026-03-02-receipt-dataflow.pdf
IMG_4471.pdf -> 2026-02-28-statement-first-national.pdf
3 files have no readable date. They are listed separately.
Say go to rename. The renames can be undone together.
An example run. Renaming from contents uses one agent task, because every file has to be read.
Before you start
What it needs
From Claude or ChatGPT
Prefer to stay in Claude or ChatGPT? Add The Drive AI as a connector, then paste the same prompt. Without it, neither has a way to reach these drives as a batch.
Claude.ai and Claude Desktop
Settings → Connectors → Add custom connector, then paste the server URL. Connectors are on your account, so the desktop app gets it too.
ChatGPT
Plugins → + → Add custom MCP server, then paste the server URL and sign in. Changing files from ChatGPT needs a Business or Enterprise workspace, where an admin publishes the server; on Pro, custom servers can only read.
Claude Code
claude mcp add --scope local --transport http thedriveai https://thedriveai.fastmcp.app/mcp
Server URL
https://thedriveai.fastmcp.app/mcp
Google Drive, connected in The Drive AI
The job runs on your Google Drive where the files already are, so that account is connected in The Drive AI first. Working in connected drives comes with Max and Team. Files you keep in The Drive AI workspace work on any plan.
See plansWhat asks first, and what can be undone
Reading and searching change nothing. By default, up to 20 moves, renames or new folders apply at once; anything larger, and anything that trashes, edits or moves a file between drives, comes back as a preview with counts and samples for you to confirm. An applied change is undone as a whole with one request. Moves and renames reverse as long as the file has not changed since; trashed files come back from Google Drive, personal OneDrive and Dropbox, and from work OneDrive or SharePoint only where an admin has allowed restores.
Then ask
Follow-up prompts
Also move each one into a folder for its document type.
Renaming and filing can be one change: each file is moved and renamed in a single step.
Show me the three files with no readable date.
Usually poor scans or photos at an angle. Fix or rename those few by hand.
Do this automatically for every new scan that lands in that folder.
A naming rule you want applied forever is a workflow. The agent builds one for you to review.
Tips and limits
Give one example name
One example such as 2026-03-14-invoice-acme.pdf settles the date format, the separator and the order better than a paragraph of rules.
It cannot name what it cannot read
A blurred or very faint scan may give up no date or sender. Read down the proposed names for those before you confirm, and expect a short list to finish by hand.
Two files with the same new name get a number
If two invoices from the same vendor share a date, the second gets a numbered suffix. Add an invoice number to the pattern if you would rather they differ by name.
FAQ
Common questions
How do I rename PDF files based on their content?
Ask The Drive AI to rename the folder and give one example name. The agent reads each document, extracts the details you asked for, and proposes a name for every file; you approve the list before anything is renamed. Power Automate can do it too, but you build and maintain the flow yourself.
Does renaming break links to the files?
Not in Google Drive, OneDrive or Dropbox, where shared links follow the file rather than its name.
Can Claude or ChatGPT rename files by their contents?
Claude's own Google Drive connector can rename files one at a time after reading each. With The Drive AI connector added, Claude or ChatGPT hands the whole folder to The Drive AI agent and gets every name back as one change, which uses one agent task on your The Drive AI plan.
Ask it here, or from Claude or ChatGPT.
The same sentence works in The Drive AI, and in Claude or ChatGPT with our connector. Either way, a large change comes back as a preview for you to confirm, and anything applied can be undone as a whole.
