Files & processes · BUILT-IN MODULE

shutil

Filesystem copy/move helpers.

Quick start

use shutil
use shutil

try shutil.mkdir "backup"
try shutil.copy "app.se" "backup/app.se"

API reference

shutil.copy source target

Copy a file. Fallible.

複製檔案。此操作可能失敗。
shutil.move source target

Move or rename a path. Fallible.

移動或重新命名路徑。此操作可能失敗。
shutil.copytree source target

Recursively copy a directory. Fallible.

遞迴複製目錄。此操作可能失敗。
shutil.remove path

Remove a path tree. Fallible.

移除 a path tree. 此操作可能失敗。
shutil.mkdir path

Create directories. Fallible.

建立目錄。此操作可能失敗。