i want to copy a folder form path to another but I got this error
Error:
PermissionError: [Errno 13] Permission denied: 'D:/compine/data'
code:
import shutil
shutil.copy("D:/compine/data","D:/compine/copy")
您是否要复制整个目录然后使用
shutil.copytree("D:/compine/data","D:/compine/copy")
使用copyfile(source, destination)
代替
shutil.copytree("D\\\\compine\\\\data","D\\\\compine\\\\copy")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.