![]() |
Extracting multiple zip files into same directory?
This is driving me crazy. I'm trying to extract a file split into several zip archives. All the programs I've tried are extracting each zip to a separate folder do I need to start collecting them. None of these apps have the option to not create a folder. I've tried unarchiver, betterzip, zipeg, and the osx zip utility.
Isn't there a solution for this without using the terminal? |
What format exactly is the zip? What information do you get from "Get Info" or running the 'file' command.
Was the file split prior to zipping? In this case you'll need to extract everything and then recombine the file, probably with 'cat' or something like Split&Concat. Was the zip itself split after compression? Here the zip program should handle the multi-part archive. The fact that this hasn't happened leads me to believe that the split occurred on the file rather than the archive. |
Doing it from terminal would be a lot easier and could be done with wildcards (batch). But, you didn't want that solution…
|
Each zip contains a rar file, which together form the file. When using winzip or winrar in windows this never caused me any problems. Why can't two files be unzipped to the same place?
|
Code:
# cd <path to zip files> |
Geez guys,
So there's no way of doing this simple task without the terminal? |
You could write a bash script to do it... Likewise, so could an Automator script.
|
both Archive Utility and Stuffit Expander have the ability to specify destination folders and enclosing folders - check their preferences (Archive utility lives in /System/Library/CoreServices). also, if you find the program that made and split the zips in the first place, it ought to recognize its own work and recombine the files (assuming, of course, that the person who did the zipping in the first place didn't split the files manually, of course).
|
I have "into same directory as archive" selected in "expand to", the problem is it creates a folder for each zip, and there's no setting for not creating this folder.
|
The alternative is to let the extractor extract them where it wants to, and then automate the collation of all the files into one location.
|
Quote:
|
There must be a mac version of winrar or similar?
|
Quote:
|
The Unarchiver
There's a couple of others at versiontracker.com too. But I think The Unarchiver does what you want. |
I've tried Unarchiver and it's the same issue as with the osx archive utility. They create a folder for each zip. Macpar Deluxe doesn't do zip's as far as I gathered.
Is this only bothering me? Has no one encountered this? |
I think you're the only one who has encountered a download where the packager was ... "creative" ... enough to individually zip the already compressed segments of a RAR archive. This is the kind of bonehead move that makes me question the source of your download.
Your quickest solution is going to be to extract each zip file into their individual folders and then use Automator or the command line to move the resulting RARs into a common folder. ( mv -i */*.rar ./ ) Then unrar the files with any RAR supporting extractor. And as a final action, berate your packager. |
The folder which is "created" is already part of the archive. That is, in your case, the RAR archive has been put in a folder, then that folder zipped.
I've just checked (using 10.5.8), and creating a RAR archive, zipping it, then double-clicking on the zip file does not create a folder (i.e. the original RAR file appears in the same directory as the zip file). This means that, to get the behaviour you desire, the unzipping program will have to have an option to discard the top-level directory if one exists. Since it seems like a rare edge-case, I don't find it surprising that no utilities have that option (and as others have mentioned, it's trivial to get round using a couple of basic Terminal commands). |
I have to agree with fracai and eatswithfingers here. either you have your decompression app misconfigured or the person creating these archives is doing it the wrong way. my guess would be that they are opening the folder and compressing the contents of the folder, rather than compressing the folder itself; some compression apps will will make separate compressed items under those circumstances. assuming it's a problem with the source, and this happens to you often enough to worry about, you'll either need to email the provider and tell him to package the files correctly, or you'll need to write a script to reorganize the files as tehy are decompressed.
|
Fracai, my sources are indeed questionable, and I will say no more...
EatsWithFingers, I think you'll find that when trying to unzip several zips at once they will be extracted to separate folders without any option to do otherwise in the app's prefs. |
Quote:
What does the following command output on your system? (assuming you're not completely adverse to using the Terminal...) Code:
$> unzip -l <ZIP_FILE> |
I get the following syntax error
-bash: syntax error near unexpected token `newline' |
Yes. You would get that if you entered the line verbatim.
I believe EatsWithFingers meant that you enter into terminal the words "unzip -l " (without the quotes) followed by the name of your zip file. After entering the above text including the space at the end, simply drag your zip file from Finder into the Terminal window to address it by its full path. |
Quote:
The command lists the contents of the zip file and will show us whether or not the zip archive contains just the RAR file, or if it contains a folder with a RAR file. |
Length Date Time Name
-------- ---- ---- ---- 2931712 05-22-08 23:14 bbl.rar 410 05-22-08 23:14 file_id.diz This happens with every file split into several zips, not a specific file. |
Quote:
There is a solution to your problem though: Zipeg. If you uncheck "Append archive name to the destination" in the preferences, no folder will be created. Note: you cannot extract multiple archives at once with Zipeg, but it does support multi-part archives. (Aside: Info about file_id.diz for interested parties) |
Thanks for hanging in there EatsWithFingers throughout this topic.
If zipeg doesn't support extracting multiple archives at once, I'd rather use the terminal :) |
Automator or AppleScript
Quote:
|
questionable sources are sometimes the oldest sources
[QUOTE=flextone;558926]Fracai, my sources are indeed questionable, and I will say no more...
Yes, I'm familiar with that source, odd in a way how many aren't, newsgroups seem to be used more by the older computer crowd ;) But the solution to your problem lies in Stuffit Deluxe 2010, in the extraction prefs you just uncheck create enclosing folder, and move zips to trash and your just left with the rar's and bunch of .nfo files and brag tags. This question drove me nuts cause I was one of those things that was problem, then wasn't, now its back and I couldn't remember the solution. All most as an omen of reading this I read about a fellow that wrote an Automator Script that handled it. I looked at that last week thinking I should get that and look at it. Thought I had, couldn't find it on my computer or the original link anywhere I tried. I'm googled out. Maybe some one else can find it! As to the why of this crazy practice to split rar files that are then individually zipped is a protection scheme. That all started in the Windows groups as a way to protect segments, Zip files where easier to repair. This is before Par files came into use. It's a pain if you see something you want to look at. Expanding the zips into folders then dragging the rars all together in one folder was a major chore. Another thing I think the recursive compression was for was to defeat virus and trojan scanners. So any file done that way is on a quarantine level until ClamXav can be used to scan it. Why the practice is still being done is just inertia now I believe, I haven't found nearly as many infected ones as I used too either, so why continue it? |
Hello guys,
Sorry for waking an old thread. I have just bought a MacBook Pro for my grandmother. She can use computers for basic tasks, such as Email, Viewing photos and other very basic things. She has a set of zip archives. Each zip archive contains a .rar file. When you have all the .rar files, you can extract all and get one folder of pictures. Please do not ask why someone has put .rar files in a zip file. I come from Windows, and I find life way to intuitive and easy over there. On Mac, it is very hard. The guy at the Apple AppStore said that Macs are easier to use than Windows. My grandmother spent a couple of hours looking for the Delete Key on the MBP when I told her to delete unnecessary files on her desktop. Anyway, that is not the issue tonight. In Windows, I right-click on all the .zip files, and say "Extract Here" and I get the .rar files in one folder. In Mac, I get a folder for each extracted .zip file. My grandmother does not know any terminal commands, let alone bash programming. Who anybody provide help? |
Using The Unarchiver
Decompress the RAR file with The Unarchiver.
The resulting folder will have multiple ZIP files. Go to Preferences and under "Create a new folder for the extracted files:" choose Never. Select all ZIP files, right-click and choose Open with The Unarchiver. Voilá. :D |
| All times are GMT -5. The time now is 09:14 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.