-1

I have a assignment to create a password protected zip file from script and sent it over email.

I am using below command over sparc-sun-solaris2.10 environment to create a password protected zip file.

`zip -j -P password file1.csv.zip file1.csv`

It is failing with the below error message:

`zip warning: name not matched: file1.csv`
`zip error: Nothing to do! (file1.csv.zip)`

It has got successful once but for subsequent runs it is failing continuously.

Any help upon this much appreciated.

1

This warning from zip:

`zip warning: name not matched: file1.csv

is given when the file specified doesn't exist. Since that means your zip command doesn't have any input files, it doesn't have anything to put into the output zip file, so you get

`zip error: Nothing to do! (file1.csv.zip)`
0

Use GPG toll like that:

gpg -c file.tar

Then set the password.

To unprotect use:

gpg file.tar.gpg
  • How does this create a password-protected zip file, though? – Jeff Schaller Dec 16 '16 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.