Wednesday, October 20, 2010

Clean Up MP3 Filenames

import os

base = '/home/maczulu/Music'
os.chdir(base)
filelist = os.listdir(base)
for file in filelist:
  if '_' in file:
    newname = file.replace('_',' ')
    print file,newname
    os.rename(file, newname)

No comments:

Post a Comment