Need to edge out the competition for your dream job? Train for certifications today.
rem Define folder to process and location of 7-zip exe file
rem If base directory not found quit
if not exist "%BaseDir%\" (
echo.*ERROR* - Base directory not found [%BaseDir%].
rem If zip program not found quit
if not exist "%ZipExe%" (
echo.*ERROR* - Zip program not found [%ZipExe%].
rem process each folder under the base folder
for /d %%D in ("%BaseDir%\*.*") do (
rem ZIP each folder into a ZIP file in base folder
echo *INFO* - Creating ZIP file [%%~nD.zip].
"%ZipExe%" a "%%~D.zip" "%%~D\*.*" -r -tzip 1>NUL
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.