from tkinter import *
from tkinter import ttk
from tkinter import filedialog
win= Tk()
win.geometry("750x250")
def select_file():
path= filedialog.askdirectory()
Label(win, text=path, font=13).pack()
Label(win, text="Выбрерите путь к папке, либо используйте стандартный", font=('Aerial 18 bold')).pack(pady=20)
button= ttk.Button(win, text="Выбрать", command= select_file)
button.pack(ipadx=5, pady=15)
win.mainloop()
for file in filename:
if os.path.splitext(file)[1] in frames:
if(path.exists(file)):
print(file + 'exist')
os.remove(file)
if os.path.splitext(file)[1] in frames:
if(path.exists(framesLocation)):
shutil.move(file, framesLocation)
else:
os.mkdir(framesLocation)
print('asd')
shutil.move(file, framesLocation)