25 practical automations

Files & folders

Organize, find, compare, and rename your files. Each guide includes full code, usage instructions, and ideas for making it your own.

Search this category ↗
PythonBeginner

Copy a curated file list

Copy only listed relative files while rejecting paths outside the source.

Files & folders
PythonBeginner

Copy matching files

Copy glob-matched files into a new folder while preserving relative paths.

Files & folders
PythonBeginner

Divide files into batches

Copy a tree into numbered batches containing a maximum number of files.

Files & folders
PythonBeginner

Find long paths

Report absolute file paths above a selected character threshold.

Files & folders
PythonBeginner

Flatten a folder safely

Copy a nested tree into one folder with path-hash filename prefixes.

Files & folders
PythonBeginner

Print a folder tree

Create an indented map of a folder and its subfolders.

Files & folders