Substitute the path to the application if necessary. It works with the 7zip module included in other applications, such as PeaZip.
For example, in my case:
for /d %%X in (*) do "C:\programes_portables\peazip portable\res\7z\7z.exe" a "%%X.zip" "%%X\"
With a GUI: Using WinRar it is possible to compress separate folders into their own compressed archives. Here’s how.