I want to archive a folder, but I want to exlude all media files.
How do I leave out *.avi and *.flac when archiving?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI want to archive a folder, but I want to exlude all media files.
How do I leave out *.avi and *.flac when archiving?
Only possible solution is to use the command-line version (it doesn't work in the GUI [Add to Archive] dialog):
7z.exe a Archive.7z C:\Folder\* -r -x!*.avi -x!*.flac
The "Parameters" input box in the GUI can only be used for compression parameters and cannot be used with standard command line parameters.
& $a7z a $archName $binpath $addfiles -m0=LZMA '-xr!*.config' '-xr!*.log'
works like a charm for me
Also
7za -bt -mx9 a archive.7z d:\backups\* -x!*.7z
and
7za -bt -mx9 a archive.7z d:\backups\*.* -x!*.7z
Created different result. The one with *.*
seem to work.
*.*
means "must have extension, but the extension can be anything". See sevenzip.osdn.jp/chm/cmdline/syntax.htm
Dec 1, 2022 at 22:09