Python Shutil Module
High-level file operations — copy, move, copytree, rmtree, make_archive. This category documents 9 Python shutil module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: shutil.copy(), shutil.copy2(), shutil.copytree(), shutil.move(), shutil.rmtree(), shutil.make_archive(), shutil.get_archive_formats(), shutil.disk_usage(), shutil.which(). shutil.copy() copies a file from src to dst (or into a directory). shutil.copy2() like copy() but also preserves metadata (timestamps, permissions). shutil.copytree() recursively copies an entire directory tree. shutil.move() moves a file or directory to a new location. shutil.rmtree() recursively deletes an entire directory tree (like rm -rf). For a structured walkthrough of the whole topic, read the Shutil Module guide. Shutil Module belongs to the File & Data group alongside Pathlib Module, Glob Module, Fileinput Module, Tempfile Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.