0

I was trying to rename a file in python.I went to the directory using os.rename then tried to change a song name os.rename('shokilla.mp3, new_shokilla.mp3') but this error poped up about I don't have any idea Traceback (most recent call last): File "<pyshell#23>", line 1, in <module> os.rename('shokilla.mp3, new_shokilla.mp3') TypeError: Required argument 'dst' (pos 2) not found

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
G-Ox7cd
  • 51
  • 1
  • 4
  • 9
  • 1
    Does this answer your question? [How to rename a file using Python](https://stackoverflow.com/questions/2491222/how-to-rename-a-file-using-python) – Trenton McKinney Jun 28 '22 at 19:52

1 Answers1

0

you need to do like this

os.rename("shokilla.mp3","new_shokilla.mp3")

https://www.tutorialspoint.com/python/os_rename.htm

Ajay Singh
  • 1,251
  • 14
  • 17