I have a folder which has a list of files. I have two dictionaries which has original filenames and new filenames.
FldName = r'C:\Users\Shei\Documents\Test'
oldFname = {'mangoes.txt', 'apple.txt', 'banana.txt'}
NewFname = {'random.txt', 'example1.txt', 'something.txt'}
I understand I can use the following to rename a single file
import os
os.rename('Apple.txt','example1.txt')
but I am not sure, how do I bulk rename files based on list in the dictionary.
Any help would be greatly appreciated