Is there a way to display all the files and folders in an archive using the 7-Zip command line, while excluding '*' from the list using regular expression? I am trying to identify the number of folders at the first level of the archive (such as xxx\ or xxx, but not xxx\abc).
In the list of the archive, I want to match the last three items and then exclude them, while still keeping the first one:
xxx<br>
xxx\123.txt
xxx\abc
xxx\abc\456.pdf
I attempted to achieve this using 7z l archive.zip -x!*\*
, but it ended up excluding the first item xxx\
.
Update:
I am currently using *\?*
as a temporary solution to filter out the outputs.