Python - os.rename() - OSError: [WinError 123]

前端 未结 2 936
执念已碎
执念已碎 2020-12-12 02:02
path=\'U:\\\\rmarshall\\Work For Staff\\\\ROB\\\\_Downloads Folder\\\\\'
file=\'file.pdf\'
newFileName=time.strftime(\'%Y-%m-%d_\')+row[1]+time.strftime(\'_%H:%M:%S\         


        
2条回答
  •  时光取名叫无心
    2020-12-12 02:32

    the error is due to the fact that windows doesn not support charcter "" in the names. Your shuld modify this by replacing "\n" with "".

提交回复
热议问题