2022-04-13 16:48:17 +02:00
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
import tkinter
|
|
|
|
from tkinter import filedialog
|
|
|
|
|
|
|
|
root = tkinter.Tk()
|
|
|
|
print("select List File:")
|
|
|
|
filename_Filelist = filedialog.askopenfilename()
|
|
|
|
print("select Directory:")
|
|
|
|
filename_Directory = filedialog.askdirectory()
|
|
|
|
root.withdraw
|
|
|
|
print(filename_Directory)
|
2022-07-27 13:45:26 +02:00
|
|
|
adress_file = open(filename_Filelist, "r")
|
2022-04-13 16:48:17 +02:00
|
|
|
address_list = adress_file.read().splitlines()
|
|
|
|
|
|
|
|
for adress in address_list:
|
2022-07-27 13:45:26 +02:00
|
|
|
filenames = adress.split(",")
|
2022-04-13 16:48:17 +02:00
|
|
|
try:
|
|
|
|
os.rename(filename_Directory + "/" + filenames[0], filename_Directory + "/" + filenames[1])
|
|
|
|
except:
|
|
|
|
print("Failed Renaming File: " + filenames[0])
|