Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Moving and Deleting Files and Folders (Review Exercises)

mikepalermo88 on Nov. 4, 2023

Sometimes when I want to move folders I recieve the following error:

PermissionError: [WinError 5] Access is denied: 'C:\\Users\\mikep\\my_folder\\image1.png' -> 'C:\\Users\\mikep\\my_folder\\images'

Last time it happened I ran CMD as admin and installed pathlib and shutil, then restarted IDLE as admin and it worked. Next time I tried to use path.replace (in the same admin IDLE instance), it happened again.

Any ideas here?

Become a Member to join the conversation.