I have a script that replaces file names with a new filename that I specify, however, right now it is case sensitive (if a filename = DM, but I enter Dm, it is not being replaced)
I already tried filename.lower(), in the os.rename, but it doesn't seem to work. There are no errors though, that filename remains unaltered though.
import os
old = 'dm'
new = 'datamining'
path = os.getcwd()
filenames = os.listdir(path)
for filename in filenames:
os.rename ( path+'\\'+ filename.lower() , path+'\\'+ filename.replace(old , new) )