[python-win32] Python Error:WindowsError: [Error 32] The process cannot access the file.

manu agarwal nmanu14387 at gmail.com
Tue Nov 12 11:05:10 CET 2013


Hi,

I am getting the below error while executing the script on one of the
application server.

*WindowsError: [Error 32] The process cannot access the file because it is
being used by another process*

Script used to delete the files from the server.

I had used os.remove(file) and tried with os.unlink(file). But it is giving
me the same error.

Is there any way i can skip the files which can not be deleted and script
proceed further to delete other files or it delete the files forcely
without giving this error.

I know the process which was using the files but i cannot stop that service
because it will impact the application.

Please suggest.

Thanks
Manu Agarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20131112/446fa524/attachment.html>


More information about the python-win32 mailing list