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
You renaming files in current directory but reading in the folder. You need to add to os.rename the folder path or at the beginning os.chdir(folder) and then just use os.listdir() and os.rename
folder
os.rename
os.chdir(folder)
os.listdir()