Error 13 Permission Denied Python

懵懂的女人 提交于 2020-01-03 04:35:12

问题


I am trying to write a code to compare directories (sub directories and files within), then copy the contents of the other directory (files only including files in the sub-directories) to the other directory. I imported everything then I have this:

dst = "C:/somefolder" 
path = "C:/otherplace"
compare = filecmp.dircmp(path,dst)
ans = compare.right_only 
for fil in ans:
  if len(ans)>0:
    shutil.copy2(dst,path)

i have tried other routes using os.listdir but i always seem to end up at the error

IOError: [Errno 13] Permission denied

this written in python 24

I am running my code using cygwin but i am a windows user

来源:https://stackoverflow.com/questions/21585950/error-13-permission-denied-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!