📜  如何在 python 代码示例中移动 txt 文件

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

代码示例1
import os
import shutil

os.rename("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")
os.replace("path/to/current/file.foo", "path/to/new/destination/for/file.foo")