myfreeer / 7z-build-nsis

7-zip build and package script with nsis script decompiling using ms visual studio
GNU Lesser General Public License v2.1
235 stars 43 forks source link

Support user-defined extension filtering #9

Open ghost opened 4 years ago

ghost commented 4 years ago

Some extended types of files are redundant and even dangerous. I hope that 7z can support user-defined extension filtering like WinRAR, so that certain files will not be decompressed. Thank you!

myfreeer commented 4 years ago

The feature is supported in command-line version, via the -x switch.

If you are requesting this feature on gui, this issue should goto the official or zstd repo, this repo is build script for 7-zip, not a fork.

Below is the 7-zip document of -x switch.

-x (Exclude filenames) switch Specifies which filenames or wildcarded names must be excluded from the operation.

Multiple exclude switches are supported.

Syntax -x[]

::= r[- | 0] ::= @{listfile} | !{wildcard} See -i (Include) switch description for information about option parameters. Examples 7z a -tzip archive.zip *.txt -x!temp.* adds to the archive.zip all *.txt files, except temp.* files. 7z a archive.7z Folder1\ -xr!*.png adds to the archive.7z all files from Folder1 and its subfolders, except *.png files. Commands that can be used with this switch a (Add), d (Delete), h (Hash), e (Extract), l (List), t (Test), rn (Rename), u (Update), x (Extract with full paths) See also Switches: -r (Recurse), -i (Include)
ghost commented 4 years ago

Thank you first! I have known that, and I’m sure you never use it that way. I talking about GUI version. I have posted it to 7-Zip-zstd fork. SourceForge cannot register. Could you help me to feed this requirement to the official forum?