i’d like to zip everything except one file
7z a -tzip files.zip *
this will zip all the files in my current directory.. is there a way I can tell it to not zip one file or one file type ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Per the 7za command-line help, you use the -x switch to do this:
To exclude the file foo.txt you would add:
To exclude all .html files (*.html) you would add:
You can add multiple -x entries to exclude multiple filenames and/or wildcards in one zip command. Adding the following will exclude foo.txt and *.html:
So with your example, this would add all files to files.zip EXCEPT files named "FILENAME" or that matched the *.extension wildcard: