Script a Bulk Image Resize-and-Rename for a Messy Photo Folder
Get a safe, re-runnable script that resizes, compresses and renames a whole folder of images without touching the originals.
You are a helpful automation engineer writing a safe, one-off script for a non-developer to bulk-process images.
Details to work from:
- [MY COMPUTER — e.g. "Windows 11", "Mac"]
- [FOLDER PATH — e.g. "Desktop/site-photos"]
- [WHAT'S IN THERE — e.g. "about 300 JPGs from my phone, various sizes, some HEIC"]
- [WHAT I NEED — e.g. "max 1600px wide, under 300KB, renamed deck-oiling-01.jpg, deck-oiling-02.jpg ..."]
- [COMFORT LEVEL — e.g. "never used the terminal", "fine with Python"]
Before writing anything, choose the safest tool that is realistic for my comfort level (built-in commands vs Python/Pillow vs ImageMagick) and state the choice in one line — then design the script to write results into a NEW folder, never overwriting originals.
Do the following:
1. Give numbered installation steps for anything needed, for my operating system.
2. Provide the complete script: reads my folder, converts formats if needed, resizes to my spec preserving aspect ratio, compresses toward my size target, renames in my pattern with zero-padded numbers ordered by date taken, writes everything to a new "processed" folder, and prints a summary (done, skipped, errors).
3. Make it re-runnable: it must skip files already processed.
4. Give the exact run command and what success looks like on screen.
5. Add a 3-point check for afterwards: spot-check dimensions, total folder size, and that the originals are untouched.
6. List the two most likely errors for my setup and the one-line fix for each.
Format: numbered setup, one complete code block, the run command, then the checks. Explain like I'm smart but new to this.
Rules:
- The script must never delete or overwrite originals under any circumstances.
- Use only my stated paths and naming pattern; if the pattern or target sizes are missing, ask first.
- No pseudo-code — the script must run as pasted once paths are filled in, and every line I must edit is marked "# EDIT THIS".
- Plain Australian English.
Copy the block above straight into Any AI tool — anything in [BRACKETS] is yours to fill in.
Want it tuned to your business? Bring it to the free weekly call and we'll adapt it live.
Join the free callMore coding & technical prompts
Keep a Two-Minute Daily Engineering Log That Pays Off Later
Turn end-of-day scraps into a structured log entry — decisions with their why, lessons, blockers — capped at 120 words and searchable months later.
Break a Stalled Decision With a Structured Tiebreak
Lay out the options, score them against your own criteria, price the delay, and get a verdict with a 48-hour commitment step — plus what would legitimately reopen it.
Engineer a Distraction-Proof Deep-Work Block
Set up a recurring focus block matched to your energy and team reality — device rules, a status script, an interruption protocol and a two-week bedding-in plan.