Last Updated: May 22, 2026
The shutil module is Python's high-level toolbox for moving real files and directories around on disk. Where os gives you small surgical operations (rename one entry, remove one file) and pathlib gives you a clean way to write paths, shutil is the layer that handles whole-file and whole-tree work: copy this directory into that one, zip up a folder for download, move a file across drives, delete a tree of generated reports. This lesson walks through the parts of shutil you'll actually reach for in an E-Commerce codebase: copying, moving, removing, archiving, checking disk space, and finding executables.