print("Folder exists:", os.path.exists(folder))
Pls confirm that the folder path is correct and then if it is correct path, pls debug the code with debugging. I think your code would run if the path is correct.