python os.rename(…) won't work !

前端 未结 6 813
离开以前
离开以前 2020-12-22 00:26

I am writing a Python function to change the extension of a list of files into another extension, like txt into rar, that\'s just an idle example. But I\'m getting an error

6条回答
  •  死守一世寂寞
    2020-12-22 00:54

    If you aren't in the directory C:\Users\B\Desktop\sil\sil2, then Python certainly won't be able to find those files.

提交回复
热议问题