Extract all Zip's in a directory (incl. subfolders) with a .bat file or dos command



When it comes to IT administration tasks, extracting files from zipped archives can be a time-consuming and tedious process. As the amount of files grows, the task becomes increasingly difficult. Luckily, there is an easy way to automate the process of extracting files from zipped archives in a directory, including subdirectories, using a batch file or DOS command.

The first step is to create a batch file. This file will contain the command necessary to extract the files from each zip archive. The command needed is “extract”, so the batch file will look something like this:

for /r %%X in (*.zip) do extract %%X

This command will loop through all the zip files in the directory and its subdirectories, and extract the files from each one.

Once the batch file is created, the next step is to run it. This can be done by opening a command prompt, navigating to the directory containing the batch file, and typing “extract” followed by the name of the batch file. For example, if the batch file is named “extract.bat”, the command to run it would be “extract extract.bat”.

Alternatively, the batch file can be run from the command line without opening a command prompt. To do this, simply type the full path to the batch file. For example, if the batch file is located in the “C:\\files” directory, the command to run it would be “C:\\files\\extract.bat”.

Once the batch file has been run, the files from each zip archive in the directory, including subdirectories, will be extracted. The files will be placed in the same directory as the zip archive.

Using a batch file or DOS command to extract files from zipped archives in a directory, including subdirectories, is a quick and easy way to automate the process. It eliminates the need to manually extract the files from each zip archive, saving both time and effort.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo