[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

7-Zip CLI

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 1

File: 7zip.jpg (17KB, 400x338px) Image search: [Google]
7zip.jpg
17KB, 400x338px
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.
Thread posts: 8
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.