Skip to content
UPEEC

shutil

High-level file operations: copy, move, delete trees, archives and disk usage.

Beginner
Comments 0
import shutil
shutil.copy2("a.txt", "backup/")
shutil.rmtree("build")
shutil.make_archive("project", "zip", "src")
shutil.disk_usage("/")

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.