Skip to content
Advertisement

os.rename() function is causing a FileNotFoundError

I was study the import os today, I working with a rename code.

JavaScript

and it was error due to:

JavaScript

So I was confused with the error cause I don’t know what am I doing wrong.

This is the Folder I was working with:

screenshot

Advertisement

Answer

Try this:

JavaScript

Edit:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement