Sort and rename files in a shared folder
Each file renamed and moved by your rules, with a list of every change. Nothing moves before you approve.
- You start it: When you start it
- Asks you first
What it does
The task
Read the files in the folder folder in Google Drive or Dropbox, at most 500. For each file, find the type of document, the date and the company or person it is about, and make a new name with the pattern name pattern. Choose a subfolder for each file with these rules: rules. Show me a table with the old name, the new name and the new folder. Ask me before you rename or move any file. Do not delete files, and skip the files that other people own.
- It works in Google Drive and Dropbox, in the workspace you pick, and signs in with passwords from your Cuiar vault.
- It runs once, when you start it.
- It stops for your approval before it sends, posts, pays, books or changes a record.
What you give it
| Blank | What to give | Example |
|---|---|---|
| folder | The folder to sort | Shared/Admin inbox |
| name pattern | How to name files | YYYY-MM-DD_Company_Document type |
| rules | Which files go to which folder | Contracts to Contracts/company, receipts and bills to Finance/month, minutes to Board/year |
What you get back
An example run with the example values above. Your run uses your own data.
214 files in Shared/Admin inbox: 188 to rename and move, 26 to leave
| Old name | New name | New folder |
|---|---|---|
| scan_0012.pdf | 2026-10-14_Officeline_Lease addendum.pdf | Contracts/Officeline |
| IMG_4471.jpg | 2026-10-02_CityRide_Receipt.jpg | Finance/2026-10 |
| Document (3).docx | 2026-09-30_Board_Minutes Q3.docx | Board/2026 |
| bill.pdf | 2026-11-01_Cloudbase_Bill CB-55120.pdf | Finance/2026-11 |
... 184 more
Left as they are: 26 files that other people own
Waiting for your approval to rename and move 188 files.
Run it in Cuiar
- 01
Open it
Click Use in Cuiar on this page. The side panel opens with the task in the composer.
- 02
Fill in 3 blanks
Type folder, name pattern and rules. Tab moves to the next blank.
- 03
Run it
Run sends it to the agent. Follow each step in the panel, and stop it at any time.
From the terminal
cuiar exec "Read the files in the folder Shared/Admin inbox in Google Drive or Dropbox, at most 500. For each file, find the type of document, the date and the company or person it is about, and make a new name with the pattern YYYY-MM-DD_Company_Document type. Choose a subfolder for each file with these rules: Contracts to Contracts/company, receipts and bills to Finance/month, minutes to Board/year. Show me a table with the old name, the new name and the new folder. Ask me before you rename or move any file. Do not delete files, and skip the files that other people own."Run it from your AI agent
Claude Code, Codex, Cursor and other MCP clients reach Cuiar at https://mcp.cuiar.com/mcp. Add the server one time, then ask for the task in plain words, or call run_task yourself.
1. Add Cuiar to Claude Code
claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp2. Ask your agent
Use the Cuiar tool run_task to run my "Sort and rename files in a shared folder" template with folder = Shared/Admin inbox; name pattern = YYYY-MM-DD_Company_Document type; rules = Contracts to Contracts/company, receipts and bills to Finance/month, minutes to Board/year.Setup for other agents: AI agents.
The tool call
{
"name": "run_task",
"arguments": {
"task": "Read the files in the folder Shared/Admin inbox in Google Drive or Dropbox, at most 500. For each file, find the type of document, the date and the company or person it is about, and make a new name with the pattern YYYY-MM-DD_Company_Document type. Choose a subfolder for each file with these rules: Contracts to Contracts/company, receipts and bills to Finance/month, minutes to Board/year. Show me a table with the old name, the new name and the new folder. Ask me before you rename or move any file. Do not delete files, and skip the files that other people own."
}
}Related templates
All ops templatesData
Combine many CSV files into one sheet
All files from a folder in one table, with the columns lined up and the source file on each row.
You start it: When you start it- Google Drive
- Google Sheets
- Dropbox
OpsAsks first
Remove a former employee's access to your tools
Every account the person still has, closed after your approval, with their files moved to a new owner.
You start it: When you start it- Any admin panel
- Google Drive
- SSlack
- +1 more: GitHub
Ops
List renewal dates from your vendor contracts
End date, notice period and auto-renewal of each contract in a sheet, the next deadline first.
You start it: When you start it- Google Drive
- DDocuSign
- Google Sheets
OpsAsks first
Register your company on a customer's supplier portal
Every field of the vendor form filled from your company files, with the gaps listed. It submits after your check.
You start it: When you start it- Any web form
- Google Drive
OpsAsks first
Find files shared publicly from your Google Drive
Every file that anyone with the link can open, with its owner and last edit. Access changes after you approve.
You start it: When you start it- Google Drive
- Google Sheets
Ops
Collect last month's invoices
The vault signs in to each account. All PDFs go to one folder.
On a schedule: On the 1st of each month at 9:00- Gmail
- Google Drive