Can't delete folder

What product/components do you use and which version/fix level are you on?

IS 10.5

Is your question related to the free trial, or to a production (customer) instance?


What are you trying to achieve? Please describe it in detail.

I want to delete folder which is located on shared drive :


and there is no way from WMPublic methods to delete it.

I tried to use java Files like this :

Files.delete(directory); and it gives me

java.nio.file.AccessDeniedException: \crsrimigas\RI_SHARE\RI\INPUTFILES\paymentFiles

Some help ??

Hi @Marko_K ,
If you are trying to delete a directory using a java service, and it fails, please check if you can try a java standalone program to do the same. This looks a permissions issue, and some other process could have a lock on the directory.
Also, you can check the Server->Logs->Error Log → Expand stacktrace to see, if there is a detailed log of the reason why this failed.


1 Like

Another consideration – the user being used to attempt to delete the directory simply does not have permission to do so. The error message is very clear – AccessDeniedException.

Looks like you’re using UNC notation to delete from a Windows share. I’m assuming the JVM hosting Integration Server is also on a Windows machine. The “run as” user of the JVM would need permission to delete that folder.

1 Like

The problem was that WM server was not started through services with the proper user which has the right to that folder. When started with proper user, everything works as expected.