filters-maker/build_make.py

14 lines
459 B
Python
Raw Permalink Normal View History

2021-08-21 08:41:05 +02:00
import os
import glob
import shutil
def filepath_mass_changer(Version ,path ,apapath, extension="txt"):
2021-11-05 16:03:04 +01:00
f = glob.glob(os.path.join(path,"*."+extension))
2021-08-21 08:41:05 +02:00
for filename in f:
s = os.path.basename(filename)
os.rename(filename, os.path.join(path, Version + '_' + s ))
f = glob.glob(os.path.join(path,"*."+extension))
2021-08-21 18:43:24 +02:00
for filename in f:
s = os.path.basename(filename)
2021-11-05 16:03:04 +01:00
shutil.copy2(os.path.join(path,s), apapath)