📜  如何使用 python 代码示例制作 bak 文件

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

代码示例1
import shutil
import os
if os.path.exists("creating file with python function"):
    path = os.path.realpath("creating file with python function")#path of the file you want to copy
    makebackup = "path where you want to save the file as backup " + ".bak"
    shutil.copy(path, makebackup)