利用python复制文件
x = open(r'D:\WorkSpace\CentOS-7-x86_64-DVD-1810.iso','rb')#文件路径
y = open(r'D:\WorkSpace\pythonProject\CentOS-7-x86_64-DVD-1810.iso','wb')
z = x.read()
y.write(z)
y.close()
x.close()
提示:
注意文件路径。
x = open(r'D:\WorkSpace\CentOS-7-x86_64-DVD-1810.iso','rb')#文件路径
y = open(r'D:\WorkSpace\pythonProject\CentOS-7-x86_64-DVD-1810.iso','wb')
z = x.read()
y.write(z)
y.close()
x.close()
提示:
注意文件路径。