Read contents of Zip file and extract the metadata from the files inside the Zip

Hi

I have a requirement for the following…

Read contents of Zip file and extract the metadata from the files inside the Zip and output the results to a csv file.

The csv needs to also include the name of the zip for each file so it can be traced back.

https://mickitblog.blogspot.com/2016/07/powershell-retrieving-file-details.html –> provides getting the metadata from a file.

What i’m not sure about is:

  1. Do i need to extract the zip contents to a temp location
  2. Read the metadata & output to the CSV
  3. Delete the temp location
  4. Do the next file
or is there a way to get the info from with in the files in the zip.

I have been told that there is over 10,000 zip files.

Thanks

Paul, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.

This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

As far as I know there is no built in way to extract the metadata without extracting the files itself. You might consider using a third party tool like 7zip. The included CLI probably extracts the metadata much faster than just with the built in functions.