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

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

代码示例3
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")