shutil¶
High-level file operations
- Copy files
src
to file or directorydst
shutil.copy(src, dst)
shutil.copy(src, dst) # try to preserve metadata
- Move a file or directory
src
to another locationdst
and return the dest
shutil.move(src, dst)
- Disk usage (byte)
total, used, free = shutil.disk_usage(path)