There is an issue with java locking files that are in use. Mainly when using the webserver.
Causing it to be impossible to delete them while the gateway is running.
But here is a solution! (For windows atleast). Using handle you can find and unlock files.
I made it a bit easier to use by writing a simple bat file. UnlockAndDelete.zip (891.3 KB)
Unzip on the pc in the gateway (in for example C:\Folder)
You can execute this through script or in the cmd line, requires admin rights!
What would I need to do to unblock the file? set fileName=%1 echo "%fileName%" for /f "tokens=3,6 skip=4 delims=: " %%I in ('%~dp0handle.exe %fileName% -p java.exe -accepteula') do %~dp0handle.exe -c %%J -y -p %%I
does not work.
The unlockAndDelete works on this window version. The script I shared does not unlock the file. When I execute it the file still says it's locked by java.exe. The CMD script I shared is in the same folder as the unlockAndDelete.bat.