|
本帖最后由 zb848 于 2019-2-28 16:06 编辑
代码import shutil,os
shutil.copy('OCXCONFIG.INI', 'C:\\DCITSPOS')
还是报错
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
===================== RESTART: E:\python37\mypython04.py =====================
Traceback (most recent call last):
File "E:\python37\mypython04.py", line 5, in <module>
shutil.copy('OCXCONFIG.INI', 'C:\\DCITSPOS')
File "C:\Python36-32\lib\shutil.py", line 241, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Python36-32\lib\shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'OCXCONFIG.INI'
>>>
|
|