HOW TO ZIP AND
PASSWORD PROTECT FILES IN AS FEW STEPS AS POSSIBLE?
If
you have a batch of files to compress and you want to add password protection
to each of them, what is the simplest or quickest way to do so?
Today
dalux tech post has the answer to a curios reader’s question.
Use
the –p option, -p (set password) switch, which specifies the password.
Syntax
-p(password)
(Password)
specifies the password
Example
Compresses
*. Txt file to archive. 7zsing the password “secret “. It also encrypt archive
headers (-mhe switch) so that the file names will be encrypted.
7z
a archive .7z –psecret –mhe * .txt
If
compressing folders:
“C\Program
files (x86)\7-zip\7z.exe” a “%X.zip”
–psecret “%%X\”
Extracts
all files from archive.zip using the password “secret”.
7z
x archive.zip -psecret
Cleck on best tech to see interesting offers
Comments