【发布时间】:2011-11-23 00:02:30
【问题描述】:
我有两个文件夹:In,Out - 它不是磁盘 D 上的系统文件夹: - Windows 7。Out 包含“myfile.txt” 我在 python 中运行以下命令:
>>> shutil.copyfile( r"d:\Out\myfile.txt", r"D:\In" )
Traceback (most recent call last):
File "<pyshell#39>", line 1, in <module>
shutil.copyfile( r"d:\Out\myfile.txt", r"D:\In" )
File "C:\Python27\lib\shutil.py", line 82, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'D:\\In'
有什么问题?
【问题讨论】:
-
使用资源管理器我可以将 myfile.txt 复制到文件夹中