top of page

Getting a List of Zipped Files Without Unzipping


If you want to get a list of files inside a zip file, you can use a Windows command to do so. This is an alternative to the technique that I blogged about March 18, 2016 that involving installing an add-in for WinZip. That add-in hasn't been so reliable for me and I like this method better.

In this example we see a folder containing two different types of container files in the format for WinZip ('helloworld3.zip') and 7-zip (FooFolder.7z). Before beginning, confirm that you have 7-zip installed as this script will utilize that software.

1. Locate the folder containing the 7-zip software files, which will probably be at: C:\Program Files\7-Zip . Copy the files named, '7z.dll'; '7z.exe'; and '7z.sfx', and paste them into the folder containing your container files.

2. Next we're going to create a text file in this folder and enter this script:

FOR /F "tokens=* delims=" %%A in ('dir /b /s *.zip') do (7z.exe l -r "%%A" >> listing.txt)

3. Save the text file and change its extension to '.bat'. Double-click on the file and a new text file will be generated listing the files in the zip file.

If you change the reference to 'dir /b /s *.zip' to 'dir /b /s *.7z' this will work on archive files in the native 7-zip format as well.


bottom of page