howtocodeai.com
Tutorials / Beginner+

Automate Your Boring Computer Tasks With AI + Python

File renaming, folder cleanup, PDF merging, image resizing, report assembly — the chores that eat your Saturdays become scripts that run in seconds. No app needed; your computer can already do this.

DifficultyBeginner+
Time30 min for your first automation; minutes for each after
You'll needClaude · Python 3 (free, likely already installed)
You'll buildA personal /scripts folder of small Python programs that delete recurring chores — plus the judgment for which chores deserve a script.

There's a category of computer work that's pure repetition: rename 200 photos, merge the monthly PDFs, resize images for the site, pull the same numbers into the same report. Before AI, automating these required learning Python first — a steep toll for saving twenty minutes. Now the toll is gone: describe the chore, get the script, run it. The chores below are real and common; the pattern transfers to yours.

First: the 60-second setup and the safety rule

Check Python exists: open a terminal (Mac: Cmd+Space → Terminal) and type python3 --version. Then the rule that prevents every horror story: test scripts on a COPY of your files first, and require every script to do a dry run. You'll see it in each prompt below — never skip it. A script that renames 200 files wrongly is a script that renames 200 files wrongly very fast.

Automation 1 — The file renamer

Write a Python script (stdlib only) that renames every photo in a folder I specify from camera junk (IMG_4032.jpg) to a clean pattern: 2026-06-04_japan-trip_001.jpg — date from the file's EXIF data if present, else its modified date, plus a label I pass in, plus a counter. REQUIRED: a --dry-run mode that prints every planned rename without touching anything, and the real run only proceeds after showing the plan and asking me to confirm. Handle name collisions safely.

Run with --dry-run, read the plan, then run for real. That two-step rhythm — preview, confirm — is the habit that makes automation safe enough to trust with originals.

Automation 2 — The PDF clerk

Merging statements for the accountant, splitting a scan into chapters, stamping page numbers: 'Write a Python script using the pypdf library (tell me the pip install command) that merges all PDFs in a folder into one file, ordered by filename, with a printed table of contents of what went where.' Variants are one sentence each — split by page ranges, extract pages 3–7, rotate the upside-down scan. This single category, for most ex-paper professions, justifies the whole tutorial.

Automation 3 — The image press

Anyone running websites resizes images forever. Once: 'Script using the Pillow library: takes a folder, outputs web-ready copies — max 1600px wide, compressed to ~80% quality, converted to .webp, originals untouched, before/after size report printed.' Every future site's images: drop in folder, run script, done.

Automation 4 — The report assembler

The monthly chore where you open three exports and retype numbers into one summary: 'Script that reads sales.csv and expenses.csv from my Downloads, computes [totals, top categories, month-over-month change], and writes summary_2026-06.html with the numbers in a clean table.' Pair it with the spreadsheet-analysis tutorial for the thinking and the self-updating-site tutorial's cron for the 'it just appears every month' endgame.

Worth knowingThe automation test: (frequency × minutes saved) vs. 20 minutes to build. A weekly 15-minute chore clears the bar by week two. A yearly chore usually doesn't — unless the script also removes errors, which for things like renaming originals or merging legal PDFs is the real value.

Build your /scripts folder

Keep every script in one folder, each with a comment block up top saying what it does and an example run command (ask Claude to add it). Six months from now, 'how did I do that again' is answered by ls ~/scripts. When a script needs a tweak — new folder structure, extra column — paste it back into a chat with the change request; maintenance is the same conversation that built it.

The mindset shift this installs

After three of these, something rewires: chores start looking like specs. 'Ugh, I have to…' becomes 'wait, that's a script.' That reflex — noticing automatable pain — is the actual skill, worth more than any single automation here, and it's the same reflex every other tutorial on this site runs on.

Keep going

Need somewhere to put it live? See where to host AI-built sites. Compare tool costs on the pricing tracker (or stick to the free options), then pick your next build.