I am new to python. Can someone explain me why my below code shows error?
import shutil
shutil.copy('E:\\python test\\python\\program\\123.txt', "E:\\python test")
I want to copy the file into another folder, but instead I get the error 'module' object has no attribute 'copy'
.
答案 0 :(得分:0)
您也可以尝试:
import os
os.system ("copy E:\\python test\\python\\program\\123.txt E:\\python test")