# Organize into folders organized_path = f"./Videos/year/title. tag.genre" if not os.path.exists(organized_path): os.makedirs(organized_path) os.rename(file_path, f"organized_path/title. tag.genre.mp4")