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.


Recent Posts

See All
backup mode for robocopy

When using robocopy command in Windows to copy files, note that if you are an admin you can use the /B switch to copy files from...

 
 

Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page