Я пытаюсь отсортировать свой клип и видео и не могу понять, кто-нибудь может мне помочь? Я хочу автоматизировать сортировку своего клипа, и я начинаю писать код, и у меня появляется ошибка, пожалуйста, помогите мне
, где проблема
def movefile(fol):
if fol == 'music':
os.rename(r'C:\Users\Admin\Desktop\tempclip&music\Music')
if fol == 'clip':
os.rename(r'C:\Users\Admin\Desktop\tempclip&music\Clip')
if fol == 'other':
os.rename(r'C:\Users\Admin\Desktop\tempclip&music\Other')
for path, dir, file in os.walk(unsort_fol) :
if path == r'C:\Users\Admin\Desktop\tempclip&music':
for fl in file:
ext = os.path.splitext(fl)[-1].lower()
if ext == '.mp3':
movefile('music')
elif ext == '.mp4' or ext == '.avi':
movefile('clip')
elif ext == '.py':
print(fl, "\nis a sorter")
else:
movefile('other')