mirror of
https://github.com/minoplhy/filters-maker.git
synced 2024-12-22 10:08:11 +00:00
build_make custom extension and default is txt
This commit is contained in:
parent
ca16382abc
commit
b1b36ff6b3
@ -2,12 +2,12 @@ import os
|
||||
import glob
|
||||
import shutil
|
||||
|
||||
def filepath_mass_changer(Version ,path ,apapath):
|
||||
def filepath_mass_changer(Version ,path ,apapath, extension="txt"):
|
||||
f = glob.glob(os.path.join(path,"*.txt"))
|
||||
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,"*.txt"))
|
||||
f = glob.glob(os.path.join(path,"*."+extension))
|
||||
for filename in f:
|
||||
s = os.path.basename(filename)
|
||||
shutil.copy2(os.path.join(path,s), apapath)
|
Loading…
Reference in New Issue
Block a user