Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Possibly recover files from a damaged ZIP archive Apps
I've been rolling old archives forward to fend off losing older files due to application and OS changes. This includes unzipping, untarring, unSITing, etc. I had pretty good luck til I hit a .zip file I created some years ago, probably on an SGI, but might have been Windows NT with WinZip. Anyway, it's damaged now. Neither Stuffit 7.0.3 under Panther 10.3.9, nor WinZip (version?) under XP, would open this file. Stuffit would act like it was working for a few seconds, then crash, leaving me with the "Submit to Apple" dialog.

In desperation, I downloaded the trial version of AZR (Automated Zip Repair) for the PC, which will only do 3MB archives in the demo mode. So I chopped up my archive with vi (bonus hint: search for "PK^C" to locate the start of each file) and recovered all but the bad file that was causing all the grief, and one adjacent file that was damaged.

Today, I was backing up the project to a hybrid DVD/DVD-ROM with iDVD. When I dragged the project directory into the DVD-ROM contents dialog box, lo and behold, there were several hidden directories with names starting with .BAHtemp-xxx-xxxxxxxxxx (the numbers varied with no obvious meaning). When I opened up one of these directories, inside were all the files that Stuffit had in fact recovered before crashing. Icons, subdirectories, everything neatly in place. Arggh! At least, I think they were from Stuffit; I had also tried plain ol' gunzip, uncompress, etc. with no success.)

So, moral of the story: always try ls -a on your directories if Stuffit crashes while opening an archive. You might get lucky!

[robg adds: As noted below in a comment by fds, it was unzip that created the hidden directories, not StuffIt. Sorry for the errors.]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[29,052 views]  

Possibly recover files from a damaged ZIP archive | 11 comments | Create New Account
Click here to return to the 'Possibly recover files from a damaged ZIP archive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Possibly recover files from a damaged SIT archive
Authored by: sampsa77 on Jul 08, '05 10:57:40AM

Just out of interest, did you try using the "unzip" command built into OS X? I've found it quite happily extracts things that StuffIT chokes on.



[ Reply to This | # ]
Possibly recover files from a damaged SIT archive
Authored by: fds on Jul 08, '05 11:01:26AM

The standard command-line InfoZIP package included with every copy of OS X also got a fix zipfile command.

Just type zip in Terminal to get a quick usage overview, or man zip for the lengthy manual.

-F Fix the zip archive. This option can be used if some portions of
the archive are missing. It is not guaranteed to work, so you
MUST make a backup of the original archive first.

When doubled as in -FF the compressed sizes given inside the
damaged archive are not trusted and zip scans for special signa-
tures to identify the limits between the archive members. The
single -F is more reliable if the archive is not too much dam-
aged, for example if it has only been truncated, so try this
option first.



[ Reply to This | # ]
Possibly recover files from a damaged SIT archive
Authored by: a9b8 on Jul 11, '05 09:10:57AM

Drat! Thanks for the info. Typing "apropos zip" did not return this command, so I did not know it existed in OS X.

To 'sampas', I believe I tried unzip without success (on this file).

To "qwerty', yes, you are right, this has nothing to do with SIT or Stuffit; my bad: I normally use Stuffit it to unzip, so had it on my mind when I wrote up the tip. (Too late now, I suspect, cause I submitted this tip here about 2 wks ago and just now saw it listed on macsurfer with the wrong title.)



[ Reply to This | # ]
Possibly recover files from a damaged SIT archive
Authored by: fds on Jul 08, '05 11:04:11AM

By the way, that .BOM* temporary folder is created by Apple's built-in unzipper included since Panther, and have nothing to do with StuffIt.



[ Reply to This | # ]
Possibly recover files from a damaged SIT archive
Authored by: overhacked on Jul 09, '05 12:31:01AM

He didn't mention any .BOM* files. He referred to .BAHtemp-* files.

Cheers!



[ Reply to This | # ]
Possibly recover files from a damaged SIT archive
Authored by: thecloud on Jul 09, '05 01:35:42AM

BAH = BOM Archive Helper. (BOM = bill of materials)



[ Reply to This | # ]
Possibly recover files from a damaged SIT archive
Authored by: a9b8 on Jul 11, '05 09:13:01AM

Aha! Thanks. (I'm the original tip submitter).

I wasn't absolutely sure after all the attempts I made where these came from. So it probably wasn't Stuffit after all.



[ Reply to This | # ]
Possibly recover files from a damaged ZIP archive
Authored by: qwerty denzel on Jul 11, '05 03:35:09AM
The title should be 'Possibly recover files from a damaged ZIP archive', since sit files are completely different to zip files.

[ Reply to This | # ]
BIG thankyou
Authored by: Ishtiaque on Aug 06, '05 08:19:26AM

Thanks a million to everyone who has posted on this thread. I recently killed the HD on my tibook and had to get a new one (heads crashed into platters and there was much destruction and agony and so forth). While I had my photos all backed up, you can imagine my horror when the zip file refused to give up its precious files no matter what I tried! The command line stuff fixed it good ;)

So you guys are life savers :)



[ Reply to This | # ]
Possibly recover files from a damaged ZIP archive
Authored by: natcarish on Jan 28, '11 01:04:03PM

This has got to be the best fix ever. I had a large archive of very important photos over a century old (taken by my Gt. Grandfather), I tried everything, every bit of software, all to no avail, and then found this and zip -FF found them all - Thank You So Very Very Much.



[ Reply to This | # ]
Possibly recover files from a damaged ZIP archive
Authored by: chaseholden on Aug 10, '11 12:22:42PM

Thank you guys. This article saved my files!
I recovered 79 of 80 files using zip -FF Phew!!



[ Reply to This | # ]