Win-2k [IOError 13] Permission denied

Colin Brown cbrown at met.co.nz
Tue Apr 2 21:23:02 EST 2002


Hi

I have an application that is moving a lot of files around on a local disk
and periodically I am getting an IOError 13 - Permission denied. Although
the program is multi-threaded, the errors seem to be occurring within the
same thread after two successive IO operations. Two code sequences that are
causing me problems at the moment are
(where x and y are files in non-shared directories):


        os.remove(y)        #  successful
        os.rename(x,y)      #  fails = IOError 13 - Permission denied


        shutil.copyfile(x,y)    #  successful
        os.remove(x)             #  fails = IOError 13 - Permission denied


I surmise that the operating system has not "completed" the first operation
before the second is requested.

The environment is Python 2.1 running under Win 2K Professional on a 1 GHz
Pentium. I would be grateful to anyone who can explain why these errors are
occurring and how to guarantee their elimination.

Thanks

Colin Brown
PyNZ





More information about the Python-list mailing list