How to Clenup MWS Logs using schedule service

Hi,

We are working on setting up cleanup service to clen old webMethods log.
While we can do it for all other components that we are using like IS, Optimize, SAP Adapter etc. we are facing issue in deleting MWS log.It is because MWS logs goes into new directory evey day and also on every restart.
We are unable to find any predefine webmethods service to list and delete the folders .

Any suggestion on how to do this or any alternate approach will be really helpful.

Environment Details : MWS 712
OS : Windows

Thanks And Regards,
Ashish A Potnis

Hi ,

I finally did this using java service + flow service approach.
Roughly the flow is
Using java service

  1. List all the files in MWS log directories
  2. Using isDirectory service copy the name of files that are directory in one string array

In flow service
3. get todays date, decrement it by number of days for which you want to keep the logs
4. Use tokanizer to separate date from MWS Directory name
5. Compare directory date with decremented date
6. For dir date older than decremented date go inside the specific directory and delete all logfiles in it. Using getfileList and deletefile service.( I have used small java service again for these two functions)
7. Once subdirectory is empty delete it using delete file service of file class. ( As we know directory can only be deleted when it does not have any sub elements)