I know you can create a text file containing a list of files and then tell 7zip to reference this file so that it can exclude them from the archive, but I cannot find the syntax for that. Can someone help?
7zip: How to exclude files (not file types) using an exclude list file
7-zipcommand lineexclude
Best Answer
After a few hours of searching, I finally figured it out. Here's the switch syntax:
7z a -xr@exclude.txt backup.7z c:\whatever\*
Notice
-xr
instead of-x
. Ther
indicates recursive so it can match excluded files in deep folder hierarchies. Also, the format of the text file can be at least ANSI or UTF-8.As for the file containing the files, as OldWolf said, it's a list separated by carriage returns like this:
Works like a charm.