Project 4: automate a boring job safely
Use Claude Code on files, with checks and an undo plan.
Goal: let Claude Code do a repetitive job on a folder of files, for example renaming 100 photos or cleaning a spreadsheet export, without risking your originals.
- Copy the folder first. Work on the copy.
- Describe the job and the rules. Ask for a preview before any change.
- Check the preview. Look at three random examples.
- Approve. Then ask Claude to write a short log of what changed.
- Keep the original until you are sure.
Prompt: safe batch job
In this folder there are photos named IMG_1234.jpg. Rename them to YYYY-MM-DD_place_number.jpg using the date from each file's metadata; I will tell you the place. First show me a table of old and new names for the first 10 files and do not rename anything yet. Never overwrite or delete a file. If a date is missing, list the file and skip it.
It sets a preview, a safety rule and an edge-case rule.
claude -p "your prompt" to build it into scripts. Test on a few files first.Make it run every week
When the job works reliably, turn it into a scheduled task with /schedule, for example “every Friday at 17:00, sort new photos in Downloads into folders by month and list what you moved”. Desktop scheduled tasks can reach your local files; cloud tasks keep running when your computer is off.
Common problems and fixes
| Problem | Fix |
|---|---|
| Some files were skipped | Good: your edge-case rule worked. Ask for the list and handle those by hand. |
| The preview looks right, the result does not | Restore from your copy, then run on 10 files only and compare. |
| You are not sure what changed | Always ask for a log of every change as the last step. |
Check yourself
Tip: use ← and → to move between lessons.