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

BlankWhat to giveExample
folderThe folder to sortShared/Admin inbox
name patternHow to name filesYYYY-MM-DD_Company_Document type
rulesWhich files go to which folderContracts 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 nameNew nameNew folder
scan_0012.pdf2026-10-14_Officeline_Lease addendum.pdfContracts/Officeline
IMG_4471.jpg2026-10-02_CityRide_Receipt.jpgFinance/2026-10
Document (3).docx2026-09-30_Board_Minutes Q3.docxBoard/2026
bill.pdf2026-11-01_Cloudbase_Bill CB-55120.pdfFinance/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

  1. 01

    Open it

    Click Use in Cuiar on this page. The side panel opens with the task in the composer.

  2. 02

    Fill in 3 blanks

    Type folder, name pattern and rules. Tab moves to the next blank.

  3. 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/mcp

2. 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."
  }
}
All ops templates