AnsweredAssumed Answered

Copy files Problem?

Question asked by JB1234510 on Jan 14, 2015
Latest reply on Jan 15, 2015 by JB1234510

Can't copy files?

IOError: [Errno 13] Permission denied:

 

import shutil, os, sys

src = r"R:\natura 2000\8847.04 MaP\6417-341_Weschnitz_Bergstrasse_Odenwald"
dest = "H:\\test"

ret = os.access(src, os.F_OK)
print "F_OK - return value %s"% ret

ret = os.access(src, os.R_OK)
print "R_OK - return value %s"% ret

ret = os.access(src, os.W_OK)
print "W_OK - return value %s"% ret

ret = os.access(src, os.X_OK)
print "X_OK - return value %s"% ret

shutil.copyfile(src, dest)

 

F_OK - return value True

R_OK - return value True

W_OK - return value True

X_OK - return value True

 

Traceback (most recent call last):

  File "R:\Karto\zGIS\Python\OrdnerKopieren.py", line 86, in <module>

    shutil.copyfile(src, dest)

  File "C:\Python27\ArcGIS10.1\lib\shutil.py", line 81, in copyfile

    with open(src, 'rb') as fsrc:

IOError: [Errno 13] Permission denied: 'R:\\natura 2000\\8847.04 MaP\\6417-341_Weschnitz_Bergstrasse_Odenwald'

 

Any idea why?

Outcomes