I have a folder full of pdf files. I\'m trying to remove all the spaces from files name and replace them with underscores. Here\'s what I have so far:
import
...
os.rename(os.path.join(folder, files), os.path.join(folder, NewName))