Rename 800 Photos in 30 Seconds: One-Off AI Scripts for Digital Chores
No coding required: ask AI to write one-off scripts that rename hundreds of files, remove duplicates, and merge PDFs — safely.

Everyone has one scary folder. Maybe "Vacation Photos" holds 800 files named IMG_2043.jpg. Maybe Downloads is drowning in duplicates. Or 60 receipt PDFs must merge into one file for an expense claim. Most people grind through by hand: click, rename, repeat, then give up at file 40.
Yet chores like these are the natural habitat of small scripts: short 20–50 line programs that do one thing quickly and consistently. The good news: you don't need a coding course first. Modern AI chatbots can write these one-off scripts for you — provided you can describe the task clearly, run it safely, and check the result. Those three skills are what we'll practice here, without writing a single line of code yourself.
Recognize a Task Worth Scripting
Not every digital chore deserves automation. The best candidates share three traits. First, repetitive and boring: renaming 800 photos, not tidying five. Second, the rule fits in one sentence — "lowercase everything, replace spaces with hyphens." If you can write the rule on paper, AI can write the script. If every file needs a personal judgment call, that remains human work. Third, file-and-folder based: scripts champion moving, renaming, merging, and duplicate detection — but go blind deciding which receipt is "worth" claiming.
The quick heuristic: one task, one rule, hundreds of targets. That's where scripts pay off.
Write a Brief the AI Can Execute
Script quality tracks brief quality. Don't ask "tidy my photo folder" — too vague. Build a four-part brief: inputs (which folder, how many files, what formats), transformation (the exact rule), exceptions (what must not be touched), and a verifiable end state.
Write a Python script for Windows 11:
Input: folder D:\Vacation-Photos, about 800 mixed .jpg and .mov files
Goal: rename every file to TRIP-001.jpg, TRIP-002.jpg, and so on
Order: by the date each photo was taken, not the old names' alphabet
Exceptions: do not touch any subfolders
Safety: must include a --dry-run flag that only prints
"old name -> new name" without changing anything,
plus a summary file count at the end
Note the --dry-run request. This is the single most important habit in the whole workflow: ask for a simulation mode in the first brief, not after an accident.
Run It with a Three-Layer Rule
AI-written scripts are fast — and speed cuts both ways: fast to fix things, fast to wreck them when wrong. Stick to three layers:
- Test on a copy. Copy the folder (say, Vacation-Photos-TEST) and run the script there. The original stays untouched until results are proven correct.
- Dry-run first, read slowly. Scan the "old name -> new name" list for oddities: files skipped, sequence jumps. Catch problems now, while damage is still zero.
- Two-minute script skim. You don't need to understand every line; find two things — the part that modifies or deletes files (make sure it only targets your folder) and proof there's no odd network access.
To run it: install Python from python.org (tick "Add to PATH" on Windows), save the script as tidy.py, open a Terminal in that folder, then type python tidy.py --dry-run. If the output looks sane, run it without the flag.
Three Starter Scripts Everyone Uses
Begin with the most universal asks. Bulk rename by date — the brief above; perfect for phone photos, scans, and meeting recordings. Duplicate hunter — Downloads folders are duplicate museums; have the script compare file contents (hash), not names, so "report final(2).pdf" and "report final-final.pdf" with identical contents get caught too:
Python script to find duplicate files in my Downloads folder
based on file contents (hash), not file names.
Rule: keep the copy with the newest modification date.
DO NOT delete anything: move duplicates into Downloads\_duplicates.
Output: a report with file name, size, and original location.
Notice the "don't delete, just move" pattern — quarantine first, delete manually after a week of nothing breaking. The same principle covers merging 60 receipt PDFs per month (the pypdf library) or shrinking 300 images for email attachments (the Pillow library).
When It Errors, Send It Back — Don't Guess
The normal cycle: run, fail, paste the error back to the AI, receive a revision, run again. Two to four loops is healthy, not failure. To keep each loop efficient:
- Paste the full error, never paraphrase.
FileNotFoundError: [Errno 2]carries information that vanishes when you summarize it as "it says a file is missing." - One change per loop. Request three fixes at once and something new breaks — nobody knows which change did it.
- "It ran but the result is wrong" needs a concrete counterexample. "File B became TRIP-002 even though it's the oldest photo; File D should be." AI fixes sorting rules quickly when shown one clear opposing case.
While you loop, ask the AI to explain each error's cause in one sentence. Without noticing, within a week you'll know the most common error patterns by heart — the cheapest coding education around.
Turn Winning Prompts into a Personal Library
One-off scripts get thrown away; their prompts don't have to be. Save every prompt that worked in one my-scripts folder, name files descriptively ("rename-photos-by-date.txt"), and add a one-line note ("just swap the folder name and prefix"). Two months later, needing a variant — rename by category instead of date — you open the old prompt, change two brief lines, and a fresh script is ready in a minute. The side effect is worth more: you start recognizing Python patterns by accident, and one day you'll edit a line yourself before realizing you're programming.
Messy folders will keep being born — digital chores never end. The difference: once this workflow becomes habit, a two-hour task becomes thirty seconds of execution plus five minutes of supervision. Start this week: pick your most annoying folder, write the four-part brief, and let AI do the typing.
References
- Python docs: shutil — the standard modules for copying, moving, and renaming files.
- pypdf — the official library for merging and processing PDFs in Python.
- Pillow — documentation for Python's standard image-processing library.
- Automate the Boring Stuff with Python — the classic free book on automating everyday tasks with Python.



