▶ Sign up free for the video, slides & prompts
The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.
Checking…
AI angle: automate a boring task
Use AI to help write a script that renames and sorts files.
🎬 Video version coming soon — read it now
One of Python's best uses is automating boring computer work. AI can help you write the script, as long as you stay in charge and test it safely.
A typical boring task
Your Downloads folder is a mess: PDFs, photos, Excel files and zips all mixed together. Let's sort them into folders by type.
Ask AI clearly
The dry run requirement is the most important line. You see exactly what will happen before anything changes.
What a good answer looks like
Read every line before running it. Do you understand what each one does? If not, ask the AI to explain that line.
Test safely
- Make a test folder with a few dummy files. Never test on your real files first.
- Run with
DRY_RUN = Trueand read the output. - Switch to
False, run on the test folder, and check the result. - Only then point it at the real folder.
Ideas for your own automations
- Rename photos to
2026-12-06_001.jpgusing their dates - Merge 30 monthly CSV files into one
- Find duplicate files by size and name
- Make a folder for each student from a list of names
In one line
Let AI draft automation scripts, but demand a dry-run mode, read every line, and test on dummy files first.
Share with a friend