shutil

Stdlib — OS/FilePython 2.0+Beginner

High-level file operations: copy, move, remove trees, archives

Quick Info

Documentation
Official Docs
Python Version
2.0+
Dependencies
None — Python Standard Library
Install
Included with Python

Learn by Difficulty

Quick Example

python
# shutil - high-level file operations
import shutil
print("shutil provides high-level file operations:")
print("  shutil.copy(src, dst)")
print("  shutil.copytree(src, dst)")
print("  shutil.rmtree(path)")
print("  shutil.move(src, dst)")

The shutil module is part of Python's standard library. High-level file operations: copy, move, remove trees, archives.

Try in Playground

Tags

stdlibfile-iocopymovearchive

Related Items