7-Zip: How to list contents of a folder and subfolder of zip files without extracting (Win XP,Vista,7 and Command Line)

This tech-recipe will explain how to use 7-Zip to create a text file (tab delimited) listing of the contents of a zip file. You can run this .bat file in a directory and get the listings of every ZIP file contained in that directory and any sub-directories. Keep reading for the commands and explanation.

5. Then click on File > Save. Browse to our Desktop and the 7zip folder. Click the “Save as type:” drop-down and choose “All Files“. Give it a name of ziplist.bat and hit the Save button.

6. Copy the four files from the 7zip folder on our desktop: 7z.dll, 7z.exe, 7z.sfx, ziplist.bat to the folder that contains the zip files and other sub-folder of zip files.

7. Finally, run the ziplist.bat by double-clicking on it. This batch file will do the following using a FOR statement:

It will do a directory listing of the current folder and all subfolders for any file with a .zip extension. If it finds any, it will then send the path to 7-zip’s command line exe and then output the contents listing to a text file called listing.txt. This file will be saved in the same folder that the ziplist.bat is located in.

You can then import the text file into Excel or any other spreadsheet program as a Tab Separated file. Use TAB as your delimiter in Excel when importing the data.

Jimmy Selix is an early adopter that loves to be one of the first on the block to have the latest and greatest in technology and gadgets. Another love of his is being able to share his knowledge to others seeking it. Feel free to drop any comments or questions that you may have.View more articles by Jimmy Selix

I have a section on my website where .zip files may be downloaded. I uploaded a new file replacing another file via FTP. What do i need to do in my PHP coding to get it to update and recognize the change?

rae

Is this still an active thread? This works well, but does not show contents of zipped files inside of zipped files. Do you have a solution to this problem? Thank you

Harmeet Singh

Hi i would like to create a batch file to run 7 zip to archive multiple directories one after the other

Folder 1
Folder 2
Folder 3

i want to create a batch file to run 7 zip to zip all these folders at night so that i can get
zipped files by morning
please help me

Niles

Unbelievably useful! Solved a huge problem I had – so thanx a million!