SyntaxFix
Write A Post
Hire A Developer
Questions
for /d %%a in (*) do (ECHO zip -r -p "%%~na.zip" ".\%%a\*")
should work from within a batch.
Note that I've included an ECHO to simply SHOW the command that is proposed. You'd need to remove the ECHO keywor to EXECUTE the commands.
ECHO