I have some python code using shutil.copyfile:
import os
import shutil
src='C:Documents and SettingsuserDesktopFilesPy'
des='C:Documents and SettingsuserDesktop\tryPyOutput'
x=os.listdir(src)
a=os.path.join(src,x[1])
shutil.copyfile(a,des)
print a
It gives me an error:
IOError: [Errno 13] Permission denied: 'C:\Documents and Settings\user\Desktop\tryPy\Output'
Why don't I have permission to copy the file?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…