script update wip 2
import os from pathlib import Path path=Path(r"c:\temp\franzFerdinand") num=1 for dirs in path.iterdir(): print(dirs.name) files_in_path=dirs.iterdir() for item in files_in_path: file_path=os.path.join(path,dirs.name,item.name) print (file_path) file_pa=os.path.join(path,dirs.name) if item.name=="bass.wav": os.rename(file_pa+"\\"+item.name,file_pa+"\\"+item.name.replace("bass","3")) elif item.name=="drums.wav": os.rename(file_pa+"\\"+item.name,file_pa+"\\"+item.name.replace("drums","4")) elif item.name=="other.wav": os.rename(file_pa+"\\"+item.name,file_pa+"\\"+item.name.replace("other","1")) elif item.name=="vocals.wav": os.rename(file_pa+"\\"+item.name,file_pa+"\\"+item.name.replace