文件存在,python报错说不存在
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Windows\System32\LogonUI.exe'
不知道该怎么解决,希望各位达人帮助
文件存在,python报错说不存在
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Windows\System32\LogonUI.exe'
不知道该怎么解决,希望各位达人帮助
第二个with那里文件路径格式写错了,改为一个存在路径的Windows格式的路径就可以了。
with open(r"c:\Windows\System32\LogonUI.exe", "rb") as file_r:
with open(r"f:\LogonUI.exe","wb") as file_w:
file_w.write(file_r.read())