I have a list of files: Wav16.ogg, Wav17.ogg ... Wav76.ogg
that I want to convert to: a65.ogg, b72.ogg ... b32.ogg
This is what I have so far:
import os
import numpy as np
OldContent = [i.strip().split() for i in open("OTWGYNmp3/Wav#.txt").readlines()]
oldName = np.asarray(OldContent)
NewContent = [i.strip().split() for i in open("OTWGYNmp3/Key#.txt").readlines()]
newName = np.asarray(NewContent)
This is the gist of what I am trying to achieve but not sure how to move forward:
for i in len(newName):
os.rename(oldName[i], newName[i])
I've looked around and seen different answers but they all involve changing the names by some factor, not replacing with an arbitrary name: Rename multiple files in a directory in Python