Oct-22-2021, 05:42 PM
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))