rye004
asked on
How to do a directory listing of ZIP files?
I have been tasked with going through a client’s file shares and looking for file types with a specific extension. I did this easily using the dir command.
I am now being asked to create a similar listing, but for items in ZIP files. I am hoping to do something similar to the dir command with the /b switch.
I found the article below. My only concern with it is the format of the output. It will require a bit of work to make it similar to the dir command the /b switch.
http://www.tech-recipes.com/rx/9356/7-zip-how-to-list-contents-of-a-folder-and-subfolder-of-zip-files-without-extracting-win-xpvista7-and-command-line/
I wanted to see if anyone had any suggestions on how to accomplish this task?
Thanks in advance.
I am now being asked to create a similar listing, but for items in ZIP files. I am hoping to do something similar to the dir command with the /b switch.
I found the article below. My only concern with it is the format of the output. It will require a bit of work to make it similar to the dir command the /b switch.
http://www.tech-recipes.com/rx/9356/7-zip-how-to-list-contents-of-a-folder-and-subfolder-of-zip-files-without-extracting-win-xpvista7-and-command-line/
I wanted to see if anyone had any suggestions on how to accomplish this task?
Thanks in advance.
cd to the directory where you would like to list the files and run the following command:
dir /b *.zip
dir /b *.zip
Two things you can look at using - In Windows, look at the File Server Resource Manager - great tool for reporting on File Server usage and statistics. Can generate reports too.
Or, you can run the command where X: is the drive you want to check:
DIR /S /B *.ZIP X:\ > X:\ZIPFiles.txt
The above command will search the ENTIRE DISK for ZIP files and report the full path (BUT NOT THEIR SIZE!) and save that information to a file in the root of the specified drive.
If you just want a sub folder, such as the "Users" sub folder, use:
DIR /S /B *.ZIP X:\Users > X:\Users\ZIPFiles.txt
Again, replace "X" with the drive letter you want.
Or, you can run the command where X: is the drive you want to check:
DIR /S /B *.ZIP X:\ > X:\ZIPFiles.txt
The above command will search the ENTIRE DISK for ZIP files and report the full path (BUT NOT THEIR SIZE!) and save that information to a file in the root of the specified drive.
If you just want a sub folder, such as the "Users" sub folder, use:
DIR /S /B *.ZIP X:\Users > X:\Users\ZIPFiles.txt
Again, replace "X" with the drive letter you want.
powershell =P
Get-ChildItem -path c:\ -Recurse | ? {$_.extension -eq ".zip"}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please close the issue by marking a solution. Have a great day
ASKER
This ended up being the best solution for me.
You can also use PowerShell for sorting and dumping files names to CSV or Text as needed as well.