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