Web Hosting Talk







View Full Version : Help unzipping a PW protected file


Matt2001
05-21-2004, 04:16 PM
I'm trying to unzip a PW protected .zip file from the command line. I can run the unzip, and it then prompts me for a password. What i'm trying to do it make an automated script, and it needs to put the password in automatically for me. How do I do this?

Here is what I have tried:

unzip file.zip -d /home/directory/public_html/images/ -p password

Obviously the -p isn't working, is there a way to input the password automatically in a script?

Thanks

ambirex
05-21-2004, 04:41 PM
it should be a captial P

as in:
unzip file.zip -d /home/directory/public_html/images/ -P password

at least according to RH9's man page

Matt2001
05-21-2004, 04:54 PM
Didn't work. I get this error:

Archive: file.zip
caution: filename not matched: -P
caution: filename not matched: password