# Rename and sort job files with Codex

> Researched. Small business · Beginner · Operations. Updated 2026-11-09.

Canonical page: https://www.aisetupsthatwork.com/setups/rename-and-sort-job-files-with-codex/

## What it does
Rename a messy folder of job photos, PDFs and receipts by date and customer, and sort them into folders, after you approve the plan.

## Who it's for
Owners with a downloads or camera folder full of IMG_4821.jpg and scan(3).pdf who need to find a job's files fast.

## Tools
- The ChatGPT desktop app with Codex (macOS, Windows or Linux)
- A copy of the folder you want to sort
- Your naming pattern, for example 2026-11-04_Delgado_furnace_photo-1.jpg

## Steps
1. Copy the messy folder. Work only on the copy.
2. Open the ChatGPT desktop app, open the copied folder, and select Codex from the ChatGPT dropdown. Keep permissions on Ask for approval.
3. Paste the prompt below with your naming pattern and any customer names you want it to look for.
4. Read the plan Codex writes (old name, new name, folder). Fix anything wrong in chat before you say go.
5. Tell it to go. Spot-check 10 files, then delete the original only when you are happy.

## Copy-paste prompt
Adapt bracketed fields to your situation.
```text
This folder is a copy of my job files: photos, PDFs and receipts. Help me rename and sort them.

Naming pattern: [e.g. YYYY-MM-DD_Customer_job_type-number.ext]
Customers to look for in file names or PDF text: [LIST, or "none"]
Folders to sort into: [e.g. one folder per customer, plus "receipts" and "unsorted"]

Step 1: Do not change anything yet. Write plan.csv with: old name, new name, folder, and how you got the date and customer (file date, name, or text inside). Put anything you are unsure of in "unsorted".
Step 2: Show me a summary and wait for me to say go.
Step 3: After I say go, rename and move the files exactly as in the plan, and write undo.csv so every change can be reversed.

Rules: never delete a file. Never overwrite a file with the same name; add a number instead. Stay inside this folder.
```

## Guardrails
- What it touches: Chat input you provide (The ChatGPT desktop app with Codex (macOS, Windows or Linux); A copy of the folder you want to sort).
- Needs your OK: Send, pay, publish, and account changes stay with you. Treat agent output as drafts first.
- Safety level: Adds sheet rows
- Plan first, then go: The prompt makes Codex write the whole plan and wait. Nothing is renamed until you say go, and undo.csv records every change.
- Researched, not run by us: We have not run this in Codex yet. The steps follow OpenAI's own Codex docs. Work on a copy so a mistake costs nothing.
- Wrong dates on copied files. Ask Codex to use the date inside the photo or PDF when there is one.
- Customer names spelled three ways. Give it the right spelling in the prompt.
- Permissions set to Full access. Switch back to Ask for approval for jobs like this.

## Tips
- Start with one month of files to see if you like the names.
- Photo dates come from the file, which can be the day you copied it. Check a few against your calendar.
- Keep the same pattern every month so files sort in date order.

## Estimates (labeled, not measured)
- Time saved: Not stated in sources.
- Money saved: Not stated in sources.
- Tool cost: Codex is included in ChatGPT plans. OpenAI lists Free ("quick coding tasks"), Go, Plus, Pro and Business, checked Nov 9, 2026. Plan prices: see chatgpt.com/pricing.

## Sources
Summaries use the public sources below, not independent verification.
- OpenAI: https://learn.chatgpt.com/docs/quickstart (ChatGPT and Codex quickstart (read Nov 9, 2026): install the ChatGPT desktop app for macOS, Windows or Linux, sign in, open a folder (it can read and modify files in that folder), and select Codex from the ChatGPT dropdown for building and fixing code.)
- OpenAI: https://learn.chatgpt.com/docs/permission-modes (Permissions (read Nov 9, 2026): modes are Ask for approval (always asks to edit files outside the folder and to use the internet), a mode that asks only for actions detected as potentially unsafe, Full access, and Custom.)
- OpenAI: https://learn.chatgpt.com/docs/pricing (Pricing (read Nov 9, 2026): Codex is included in ChatGPT Free ("Explore Codex capabilities on quick coding tasks"), Go ("lightweight coding tasks"), Plus, Pro and Business plans.)

## Get the free starter pack
Five beginner copy-paste AI setups, free by email: https://www.aisetupsthatwork.com/starter-pack/?utm_source=ai-agent&utm_medium=markdown&utm_campaign=setup-rename-and-sort-job-files-with-codex

Related:
- [Receipts to a sheet with Claude Code](https://www.aisetupsthatwork.com/setups/turn-a-folder-of-receipts-into-a-spreadsheet-with-claude-code/index.md)
- [Sort your expenses into tax-ready categories](https://www.aisetupsthatwork.com/setups/expense-categories-for-tax-time/index.md)
- [Turn a stack of documents into one brief](https://www.aisetupsthatwork.com/setups/turn-a-stack-of-documents-into-one-brief/index.md)
