File size: 371 Bytes
8d50bff
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
# 用于批量将configs下的.example文件复制并命名为.py文件
import os
import shutil

if __name__ == "__main__":
    files = os.listdir("configs")

    src_files = [os.path.join("configs", file) for file in files if ".example" in file]

    for src_file in src_files:
        tar_file = src_file.replace(".example", "")
        shutil.copy(src_file, tar_file)