Windows 10 Batch Unzip Multiple Files with Filename the Same as Zip Directory Name

I have about 60 files to unzip as you can see below:

know the 7zip option, which can unzip all of them, but the problem is, that the file inside doesn't match the zip directory name, which would be highly desirable here.

I found some solutions for the batch file here:

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

and prepared some batch code for this which looks like this:

 @echo off
 setlocal
 cd /d %~dp0
 for %%a in (*.zip) do (
  Call :UnZipFile "C:\my\Desktop current\Occ KMZ\bat\Aldebaran" "C:\my\Desktop current\Occ 
  KMZ\bat\Aldebaran"
  )
   exit /b

but it doesn't work at all. I can neither unzip it nor get files.

The 7zip software has a few options, which potentially could be good

I found also some options here:

How can I unzip multiple "7z" files all in one go, and have the contents go into a respective folder with the same name as the zip file?

but they didn't work either.

How can I solve this problem?

but I don't know how to use the 7Zip command line in order to get the unzipped file with the same name as the zip directory.

What should I do to automatize this section?

8
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article