Skip to content
10,000 Seconds
← All journeys
Coding & web

Automate a repetitive computer task with Python

Three hour-long sessions built on the free online Automate the Boring Stuff book and the official Python docs. You'll practice on a safe test folder, then finish with a script that renames and sorts a real messy folder and logs every change.

Outcome

A reusable tidy.py that previews changes, gives every file a clean dated name, sorts files into folders by type, never overwrites or deletes, and writes a log.

10,000 sec · 2:46:403 × 55 min 34 sec
  • Every resource is a real public page our team picked. Our server checks the links; if one ever breaks, tell us and we'll replace it.
  • Always work on a copy of a real folder first, and always do a dry run. A script can move hundreds of files in a second, and mistakes are fast too.
  • This journey never deletes files. Don't add deleting until you've read the safe-deleting section of chapter 11.
  • Don't run it on system folders, app folders, or cloud-synced folders until you've tested on a copy; moving files there can break apps or sync.
  • 10,000 seconds is a structured starting point. It builds a real first result, not guaranteed expertise.

Outline

  1. 1

    Build a safe practice folder and survey it

    You have a practice folder of messy files and a script that lists and counts them by type.

    55:34
  2. 2

    Sort files into folders, with a dry run first

    A script that previews moving each file into Images, Documents, Audio, or Other, then does it for real.

    55:33
  3. 3

    Capstone: rename and organize in one run

    A finished script that gives every file a clean, dated name, sorts it into a folder, and writes a log of what it did.

    55:33

Capstone

Your file tidying tool

A Python script that previews and then renames and sorts a folder of files into type folders with clean, dated names, protects against overwriting, and logs every change, tested on a copy of a real folder.

Sources