The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Extracting multiple zip files into same directory? (http://hintsforums.macworld.com/showthread.php?t=106487)

flextone 11-06-2009 03:14 AM

I get the following syntax error

-bash: syntax error near unexpected token `newline'

Las_Vegas 11-06-2009 03:22 AM

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.

EatsWithFingers 11-06-2009 09:53 AM

Quote:

Originally Posted by Las_Vegas (Post 560328)
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.

Exactly. Sorry for not being clear enough in my post - I didn't have the time to explain that "$>" signified the prompt and "<ZIP_FILE>" meant the file name of your zip file.

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.

flextone 11-07-2009 11:05 AM

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.

EatsWithFingers 11-08-2009 10:25 AM

Quote:

Originally Posted by flextone (Post 558926)
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.

You're right, sorry. If the zip archive contains more than one file, a folder will be created containing the archive contents. My earlier test used archives containing only a single file, hence the different behaviour.

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)

flextone 11-08-2009 04:30 PM

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 :)

hallelujahtalon 11-10-2009 12:52 AM

Automator or AppleScript
 
Quote:

Originally Posted by Las_Vegas (Post 558118)
Code:

# cd <path to zip files>
# unzip * -d <destination directory>


Thanks for the hint. Is it possible to make automator or apple script action from this?

merlynwylld 11-11-2009 07:57 PM

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?

shailentj 12-15-2011 06:41 PM

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?

BorisR 05-24-2014 07:11 PM

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.