Py学习  »  Python

python shutil模块copytree

Shell1500 • 5 年前 • 245 次点击  

我正试图在python中使用shutil模块。我想复制一个文件夹( 'movee' )从我的CWD到 'D' 驱动器。 代码如下:

import shutil

shutil.copytree('movee', 'D:\\')

但是当我运行它时,会得到以下错误:

PermissionError: [WinError 5] Access is denied: 'D:\\'

我尝试以管理员身份运行cmd,但问题仍然存在。 有人能帮我修一下吗?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/38169
 
245 次点击  
文章 [ 1 ]  |  最新文章 5 年前