Unfortunately it is not possible to close a WPS folder using Classic REXX (in Object-Oriented REXX it is: see Close a folder).
For this purpose you need an additional tool like for example SendMsg from the ZipShell package or a DLL exporting a close function.