📜  shutil 移动文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:02.092000             🧑  作者: Mango

代码示例2
#all the same
import os
import shutil

os.rename("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
os.replace("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
shutil.move("path/to/current/file.foo", "path/to/new/destination/for/file.foo")