How to zip a folder which contains a folder and files in webMethods 10.3

webMethods 10.3

I would like to zip a folder which contains both files and another folder. What is the best way of doing this?

BR Mikael

Built-in Option - The simplest way is to use the built-in service named pub.utils:executeOSCommand and provide the desired command as input (link).
See page 915 to see how to use this service (link) and the additional configuration you need to do, due to security restrictions.

I haven’t tested this on Windows, but it should work as expected; the command and folder path will, of course, be different on Windows.

Custom API - Alternatively, you can create a Java service using a Java library to do this.

I recall that there was a publicly shared package named PSUtilities that had this function, but it was not updated to newer versions and it’s not an official package.


I have a service that does exactly this,

You just need to pull my package from my git repo here


1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.