Oct-22-2021, 07:37 PM
(Oct-22-2021, 05:42 PM)snippsat Wrote:os.listdir()
dos not return absolute path,so will get problem(file not found) if not is same folder when try to rename.
A trick can be to add line-8,so it change to this folder:
os.chdir('./06-27-2021')Or join so using absolute path:
os.rename(os.path.join(path, scr), os.path.join(path, dst))
That's exactly what I was missing. I didn't realize that it was not calling to the right folder to run and made so much more sense once I read your reply. Thank you!