Mac Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsMac Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 18th, 2005, 01:23 PM
trueheart78 trueheart78 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Ohio
Posts: 22 trueheart78 User rank is Private First Class (20 - 50 Reputation Level)trueheart78 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 57 m 39 sec
Reputation Power: 0
Send a message via AIM to trueheart78 Send a message via Yahoo to trueheart78
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?

Reply With Quote
  #2  
Old July 18th, 2005, 02:54 PM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
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.

Reply With Quote
  #3  
Old July 19th, 2005, 08:10 AM
trueheart78 trueheart78 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Ohio
Posts: 22 trueheart78 User rank is Private First Class (20 - 50 Reputation Level)trueheart78 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 57 m 39 sec
Reputation Power: 0
Send a message via AIM to trueheart78 Send a message via Yahoo to trueheart78
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.

Reply With Quote
  #4  
Old July 19th, 2005, 02:24 PM
trueheart78 trueheart78 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Ohio
Posts: 22 trueheart78 User rank is Private First Class (20 - 50 Reputation Level)trueheart78 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 57 m 39 sec
Reputation Power: 0
Send a message via AIM to trueheart78 Send a message via Yahoo to trueheart78
Found a solution...

zip/funzip -password archive > directory/file

Works greeat for what I need it for.

Thanks again for the help!

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsMac Help > unzipping a password protected zip file.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT