When I used Python to iterate over files in a folder and rename them, the correct code sometimes incorrectly reported WindowsError[183].
【 183 】 — & gt; Indicates that a file cannot be created while it exists.
…
Os.rename (oldFilepath,newfilepath), this error is most likely because your new path newfilepath has duplicated a file in the current folder [183].
Solution: Find duplicate files named other, or give a non-duplicate name first, then os.rename(oldFilepath, newFilepath)
Get the name you want.
For a variety of WindowsError error code, can refer to the article: https://blog.csdn.net/qq_35221523/article/details/79214356
【 183 】 — & gt; Indicates that a file cannot be created while it exists.
…
Os.rename (oldFilepath,newfilepath), this error is most likely because your new path newfilepath has duplicated a file in the current folder [183].
Solution: Find duplicate files named other, or give a non-duplicate name first, then os.rename(oldFilepath, newFilepath)
Get the name you want.
For a variety of WindowsError error code, can refer to the article: https://blog.csdn.net/qq_35221523/article/details/79214356
Read More:
- Detailed explanation of yield in Python — the simplest and clearest explanation
- Python error: permissionerror: [errno 13] detailed explanation of permission denied solution
- Detailed explanation of Python__ new__() method
- os.remove (file) error windowserror: [error 32]
- HTTP error 401 and 403 detailed explanation and solution
- Detailed explanation of UART, SPI and IIC and their differences and relations
- Mac boot boot the most detailed explanation, so that the automatic start of the program can not escape
- [Python] numpy library array splicing np.concatenate Detailed explanation and examples of official documents
- Python – [encoding] in Python os.system Solution to Chinese garbled code when calling CMD command
- Python calls DLL and reports an error windowserror: [error 126]
- Explanation of the function strip(), lstrip(), rstrip() in Python
- sys.path.append(), os.path.exists(), os.path.join() and os.makedirs() meaning
- Mac OS error in make pycaffe times failure error:’python.h’file not found resolved
- Solution: windowserror: [error 2]
- Python program uses OS. System () method to call exe program, resulting in no response of main program process
- Explanation of port mapping in dlink
- OS error reported by Python: [errno 22] invalid argument
- Workaround: windowserror: [error 193]% 1 is not a valid Win32 Application
- Solution windowserror: [error 193]% 1 is not a valid Win32 Application
- WindowsError: [Error 2] The system cannot find the file specified