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