|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
unzipping a password protected zip file.
I'm writing a script in php, but seeing it's on a Mac OS X server, I thought it fitting to ask the question here.
I can easily ftp the files over to the server, but the difficulty comes in when the I try and unzip the files. The ftp is public, but the archives have passwords. I can download them straight to my machine and unzip them no problem. It does prompt for a password and on an xp machine I can extract and view the files without a hitch. But I'm having trouble finding a solution to being able to extract them on the server. It's going to be an automated process, so extracting & then uploading them everyday is not a possiblity. This is what I get when I do the following: unzip -t MF20050718_073402_OFF_1.zip -- Archive: MF20050718_073402_OFF_1.zip skipping: MF20050718_073402_OFF_1.txt encrypted (not supported) Caution: zero files tested in MF20050718_073402_OFF_1.zip. 1 file skipped because of unsupported compression or encoding. -- I've tried using the -P [password] switch to no avail. Can someone help me out? |
|
#2
|
||||
|
||||
|
unzip -P password -t MF20050718_073402_OFF_1.zip ?
I guess it depends on the version of unzip installed. How are you scripting this? Are you the one password protecting the zip files? Is this necessary? Does your_language_of_choice have a zip API (most do)? --Simon
__________________
Last edited by SimonGreenhill : July 18th, 2005 at 03:00 PM. |
|
#3
|
|||
|
|||
|
unzip -P password -t MF20050718_073402_OFF_1.zip ?
I just tried that format, and still receive an error. I did a unzip -h to check the version, and saw this "UnZip 5.20 of 30 April 1996, by Info-ZIP." Considering they are now up to 5.52, I will see if the server admin will be updating it. I'm using php with the shel_exec function to do this. The files are retreived from an FTP that is set to allow anon logins. The files are real estate data that will be updated daily. The server we run off from is Mac OS X, and this is the first real time I've run into a big issue with it at all. Thanks again for your help. |
|
#4
|
|||
|
|||
|
Found a solution...
zip/funzip -password archive > directory/file Works greeat for what I need it for. Thanks again for the help! |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Mac Help > unzipping a password protected zip file. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|