Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
How to list all the files in the archive exclude \* in the 7-Zip command line?

I want to list all the files/folders in an archive in the 7-Zip command line and exclude '*' in the list by regular expression, to recognize the folder count in the first level of the archive(like xxx\ or xxx, but not xxx\abc).

like the list of the archive, need to match the last three, and then exclude them, also keep the first one:
xxx<br> xxx\123.txt
xxx\abc
xxx\abc\456.pdf

I try to use like this 7z l archive.zip -x!*\*, but it will exclude the first one xxx\.

Update: I use *\?* temporarily to filter the outputs.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

z-zip does not use regex nor os wildcards it has a very limited switch filename range that is simplified.

The primary issue is that although a zip file, in some incarnations, may contain an empty folder entry, most do not, they simply store the filenames with their prior path names thus there is no folder-name independent of all those file wildcard entries to be listed.

So the answer itself to your dilemma is to filter the fuller filenames output for the text you require. Probably much easier done than said on Linux, but a pain in the for loops on windows.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!