I am using a python command shutil.rmtree(dest,ignore_errors=True)
to remove files from .metadata folder which was generated when eclipse is launched.
This .metadata folder has .log file, .lock file and a folder which has plugins.
When I use this command to delete files inside this .metadata folder .log file and plugins folder gets deleted but not .lock folder. It throws an error saying that the process can't be accessed since it is used by another process.
Is there a way I can delete this lock file using python command or by using a batch script?