Hey /g/,
is it possible on Windows for 7z to unpack a whole bunch of archive files SUCCESSIVELY and at the same time apply a filter to the process, so that only files with a certain FILE NAME are getting extracted FROM WITHIN those archives?
For example:
You got 500 individual archives, each containting several files, some of which contain the word [VERIFIED] in their file name - and you only want to extract those.
I did some reading and right now it seems to me that it's not possible.
Thanks
Retard method: extract all the files to the same folder, do advanced search for files that don't contain the word VERIFIED, ctrl+a and delete everything the search shows
Source: I am a retard
>>60971199
I of course have thought of doing that. It's just not very elegant, and you need the extra space for all the unwanted files - admittedly not really a problem right now but I still would like to know if 7z or 7za are capable doing something like this.
>>60971159
list files in 7z
for each file in files:
>unpack file -> temp/file
>list nested_files in temp/file
>for each nfile in nested_files
>>if nfile.string.contains("VERIFIED")
>>>unpack nfile -> save/nfile
>del temp/file
Shouldn't this work?
7z x archive.7z -oc:\path\to\out *VERIFIED*
As per this page:
https://sevenzip.osdn.jp/chm/cmdline/commands/extract_full.htm
>>60971354
Correction, that's:
7z x archive.7z -oc:\path\to\out *VERIFIED* -r
Thanks for the suggestions. Unfortunately I do not have time to test right now, but I will later today.
I'm sure it's possible somehow. Just haven't figured it out yet.
>>60971358
I think this might work but it's only for that one file 'archive.zip', right? How do I turn it into a batch instruction for the whole folder? There are some 2000 archives in that folder?
I really don't know much about 7z cli yet. I started looking into this just yesterday for a bit. Determined to find out though.
>>60971434
i think you can loop through a set of files in a directory with powershell and hand 7zip the filename for each loop.