This question already has an answer here:
I have several folders and I need to compress the content of each folder in a separate ZIP file. However, every ZIP should only contain the content of each folder and not the folder itself.
The following code creates a file with the folder included. It is close to what I'm looking for, but I'm not there yet.
for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"
What I get:
XXX.zip > XXX(folder) > content
What I want:
XXX.zip > content
How can I do this?