import glob
import os
os.chdir("C:\Users\waldekd\Desktop\PHOTOGRAPHY")
for files in glob.glob("*.*"):
if not files.endswith("mp3"):
index = files.find("@")
if index > -1:
print files[:index]
os.rename(files, 'new'.join(files[:index]))
No comments:
Post a Comment