I create this little batch file to auto release all locks to xml file by my eclipse
@echo off
for /f "tokens=3,6,8 delims=: " %%i in ('handle -p eclipse e:\git\ ^| grep .xml') do echo Releasing %%k & handle -c %%j -y -p %%i
You need to download the handle utility from Microsoft site and grep utility from GnuWin32
If you don't need filter by file type, you can skip grep part like this:
@echo off
for /f "tokens=3,6,8 delims=: " %%i in ('handle -p eclipse e:\git\') do echo Releasing %%k & handle -c %%j -y -p %%i
Or if you don't need to filter locks by a particular program, just remove the eclipse process filter:
@echo off
for /f "tokens=3,6,8 delims=: " %%i in ('handle e:\git\') do echo Releasing %%k & handle -c %%j -y -p %%i
Remember to replace e:\git\
with your folder path.