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 ('') 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.

Thanks to Jimmy Selix for posting this script at

Recent Posts

See All

XCOPY to move and rename files

The Tip of the Night for May 8, 2018, discussed how to use XCOPY in a batch file to both copy files to a new location and rename them. Here's another approach. If this format is used, with the XCOPY

Contact Me With Your Litigation Support Questions:

  • Twitter Long Shadow

© 2015 by Sean O'Shea . Proudly created with