Zip Multiple Files Mac


Locate the files or folders you want to archive using Mac Finder. Select the files you want to zip, and right click on their selection. Follow these steps to open zip files on Mac: Click the Unzip button. From the drop down menu, choose to unzip your files to this Mac, iCloud Drive, Dropbox or Google Drive. A 'Finder style' window will open. You can browse to the folder where you want the files saved. Choose to unzip the Entire Zip file or Selected Items. Splitting Zip files. WinZip ® makes it easy to create Zip files (.zip or.zipx) that are split into smaller pieces of a size that you specify. There are several reasons why you might want to do this, such as: To assist with large downloads. Some users may have difficulty downloading very large Zip files from web sites, FTP sites, etc. Zip -r -s 64 archive.zip FolderName/ 64 is the size of the split (in this case 64Mb). Use -s to set the split size and create a split archive. The size is given as a number followed optionally by one of k (kB), m (MB), g (GB), or t (TB) (the default is m). 1 Use zipsplit to split a zip file in to multiple smaller zipfiles.

Zip multiple files into individual archives via Automator | 19 comments | Create New Account
Click here to return to the 'Zip multiple files into individual archives via Automator' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Zip multiple files into individual archives via Automator

for folders, try the -r option ..
zip -r '$f' $f'
from the man page -- a little confusing that the args are 'foo' and 'foo'. the first arg is turned into 'foo.zip' .. the second arg is the file spec (of files which will be placed into the .zip)
~~~
To zip up an entire directory, the command:
zip -r foo foo
creates the archive foo.zip, containing all the files and direc-
tories in the directory foo that is contained within the current
directory.
~~~

Zip multiple files into individual archives via Automator

Okay I must be doing something wrong because I did try to mix this hint (zip individual files) with the folder argument and it's not working...
I try both:
--
for f in '$@'
do
zip -r '$f' $f'
done
--
and
--
for f in '$@'
do
zip -r '$f.zip' '$f'
done
--
whitout any luck... :( I must admit I'm not used to play with Automator and Run Shell Script...

Zip multiple files into individual archives via Automator

Never mind.
I just tried the script for individual files with folders selected and it work just the same (~/foo/bar with foo selected become ~/foo.zip). Doh!

Zip multiple files into individual archives via Automator

Okay, one last thing... ;)
When I zip a folder with this script, let's say /foo from the Desktop level (~/Desktop/foo),
everything is working fine, i.e. it gives me a file named foo.zip at the same level as my original /foo folder (~/Desktop/foo).
The problem is when I unzip it. I end up with nested folders, i.e. /Users/MyUserName/Desktop/foo on the ~/Desktop folder. Is there a way to not include all those (almost empty) folders in the script?
The idea would be to make the script behave just like the 'Create Archive of...' in the contextual menu

The Automator workflow One Zipper does the same thing, but uses the cleaner 'xargs'. It's saved as a droplet, but can easily be converted to use as a contextual menu item.

---
www.automatorworld.com
'Better Living Through Macintosh Scripting'

Zip multiple files into individual archives via Automator

IMHO it is better to just throw them in a folder and zip the folder. It's my pet peeve when a bunch of files unzip and end up all over the place as individual files. I'd rather unzip them into a nice folder.

using filetests to zip both files and directories transparently
In order to make this automator work flow work transparently with both files and directories, use file tests, like so: Have not tested, but should work just fine.

---
The Apotek
http://theapotek.com
The Executioner's Summary:
http://www.last.fm/label/Broken+Hill+Music/playlists/6761?autostart

using filetests to zip both files and directories transparently

Sorry, does not seem to work. Added .zip to two places and it would partially work.
However, what would be nice is to have the workflow go like this:
Set up: single file on desktop, folder on desktop with some files in it and another folder in it with some more file (i.e. a level 2)
Now, results: run the work flow and have it zip the single file. Next, it would zip the folder and the subfolder. This does not happen now - no second level.
Also, would like to stip the path out of the zip file just to the folder level. For the single file a -j seems to work. However, how do you get the file path to just start at the folder being zipped, not at the user/desktop/etc level when unzipping?
Can this be done?

Zip multiple files into individual archives via Automator
I use a workflow with the following script, which does the following:
  1. Handles both files and directories
  2. Uses bzip2 instead of zip (better compression)
  3. Files are replaced by original_filename.bz2
  4. Directories are replaced by original_directoryname.tar.bz2
  5. In the event of an error, the original is not deleted
  6. File names are quoted properly to take into consideration embedded blanks which would mess up other solutions I've seen
Zip multiple files into individual archives via Automator

I would love it if this action worked, it would be perfect as i agree, i would like the extra compression afforded by it, however it simply does not work. . . do you think you could go over exactly what i should do in the automator terminal? as in should it be '/bin/bash' and 'asas arguments' ? also i copied your code exactly and pasted it in the script box, perhaps i was supposed to do something else as well? thanks.

Zip multiple files into individual archives via Automator

So many years have gone by and I still haven't found any better script to what our script does!
There is only one problem, when applied through Automator (on 10.6.8 or 10.5) is crashes after it compresses the 1st folder. Do you any idea why or if there is anything one can do to avoid this problem?

Zip multiple files into individual archives via Automator

Chas, you are missing the point.
Let's say you have a game emulator and you have 1500 roms. The emulator accepts .zip and if you zip all of the roms you save a significant amount of space.
Zipping all of the files into a single zip will not work as the emulator will probably only load the first file in the zip.
This hint is very useful for us emu geeks.

Zip multiple files into individual archives via Automator

This seems to work, but it only works if you select an entire folder and run the automator scrpt from there, otherwise if you select individual files it actually searches each file for folders and zips the files within the 'package contents' : so workflow looks like this:
in the automator place action 'get selected finder items'
followed by 'get folder contents'
followed by 'run shell script' : keep the shell as /bin/bash and the pass input as 'to stdin' the actual script is
xargs -I {} zip {}.zip {}
that's it. save the workflow as a finder selection and select a folder full of files you wish to individually compress, and it works but yes unfortunately it still makes it have that annoying files structure, which i personally can't stand, and also it doesn't seem to like working with other folders within folders and it can't seem to compress .apps very well, lastly i would like to have the option to individually select groups of files from within a folder and zip those.i dunno what's up with that. so maybe someone can take this script and flesh it out? :)

Zip multiple files into individual archives via Automator

thanks, useful tip.
does anyone know a way to get around the directory structure... at the moment i have to dump my folders in the root dir to avoid the problems unzipping.

Zip multiple files into individual archives via Automator- and use encryption

and what if you want to encrypt each file with the same password?
just adding the -e-argument fails for obvious reasons.. so how?

Zip multiple files into individual archives via Automator
A solution that works on Leopard by running an AppleScript instead of a Shell script can be found here:
http://discussions.apple.com/message.jspa?messageID=7079445
Zip multiple files into individual archives via Automator
Can someone help me with the reverse of this? I have a folder with several zip files, would like to select all, run script to unzip each in the same folder as the zip files Everything I have tried, resorts to unzipping to the root of the user's home directory. Here is where I sit right now...
Zip multiple files into individual archives via Automator

found this tip via Google. you have no idea how much time you just saved me.
i actually prefer using Terminal/Shell for zipping files...some people with older Windows systems seem to struggle with zip files made on a Mac and using the shell helps.

Zip multiple files into individual archives via Automator
will zip individual folders without the nested (absolute path) directory structure. Also, in Automator, make sure the 'Pass Input' pulldown is set to 'as arguments'.
Get a secure archiver app
Compress and unpack any files on Mac with Archiver.

The allure of zipped files is simple: they allow you to directly send and receive files, or batches of files, without encroaching on file size limits. Often, email providers have limits on how large attachments can be. Zip files make it easy to bypass that limitation without sending multiple emails.

Zipping files can also be useful for compressing files for storage on your Mac, or an external hard drive.

All-in-one file management

Get 190+ apps to deal with your files in one Setapp suite. Zip and unzip files, edit and search PDFs, change file formats, and more.

How do you open a zip file on a Mac? Or what's the best way to do that? There are, of course, several methods for creating archives, such as built-in utilities, Terminal, and third-party apps. Below, we are going to explore how to unzip files on Mac, how to create zip archives, and showcase some archivers that make it really easy to zip and manage zipped files.

What is a Zip file?

A zip file is a lossless way to compress and archive files and folders. You often encounter zip files in emails, as mentioned, but also when downloading from the internet. If you've ever downloaded an app or extension directly from a developer website, chances are it was a zipped file.

It uses the '.zip' filename, and its icon is typically a folder with a zipper running up the middle. Zipping files is a time-tested method, and is largely unchanged. Its use-cases have expanded, though. We use zip files for sending large files and bundles of PDF or text files, but it's now used as a method to send large folders of images as well as for downloading applications or games from the internet.

How to zip files on a Mac

Before we talk about some special apps and tools, we need to mention built-in macOS's utility that allows you to compress and decompress files and folders. Your Mac's simple Archive Utility, stored in the Applications > Utilities folder, is a simple, direct way to zip files. Its functionality is limited, but it's a decent option for quick zipping and unzipping of files and folders when you need to open zip files someone has sent you.

Here's how to zip a file on Mac with the Archive Utility:

  1. Find the file or files you want to zip.
    Note: if you'd like to zip multiple files, it's best to put those files in the same folder. Then you can proceed to step two.
  2. Right-click on the file or folder.
  3. Select 'compress'

That's all it takes. Note the zipped file or folder will be created in the same location as the file or folder you zipped. You can move it manually if you like.

If you want to zip multiple files without first adding them to a folder, that's also possible with Archive Utility. Here's how:

  1. Open the folder with files or folders you want to zip up
  2. Select the items you want to include in the zip file and right-click on any one of the items.
  3. Select 'Compress (x) Items' from the pop-up menu.

Once again, a progress bar will display. When the compression is finished, zipped items will be stored in a file called Archive.zip, which will be located in the same folder as the original items.

How to create an encrypted zip archive

Now that you know how to create a zip file on Mac, you may be wondering how to encrypt that zipped file. Archive Utility doesn't allow for this, but you can use the Terminal to accomplish this feat. Here's how:

  1. Open 'Terminal' from your Applications
  2. Enter the following command: cd desktop
  3. Press enter on your Mac's keyboard
  4. Enter the following command: zip -e [zipped filename]
    Note: Do not use brackets. If your filename were 'test.zip', you would enter: zip -e test.zip
  5. Press enter
  6. Terminal will ask for you to assign and verify a password.

The encrypted file will then appear on your desktop. Opening it will require a password.

We should note this method is clunky, a bit confusing for many – and dealing with Terminal is always a bit nerve-wracking. There's a much better way!

Get BetterZip for all ZIP tasks

Create encrypted ZIP archives and handle compression effortlessly. BetterZip is part of Setapp, so it’s free to try for 7 days.

BetterZip is an app that makes compression and encryption a breeze. In fact, you can set BetterZip up to encrypt all files by default! It uses strong AES-256 encryption, and has the same lossless compression you'll find with any zipping method.

Here's how to encrypt zip files using BetterZip:

Multiple
  1. Open BetterZip on your Mac.
  2. From the menu bar, select 'BetterZip,' and 'Preferences'
  3. From the 'Presets' menu, select the 'Save' menu
  4. Select 'Clean and Zip'
  5. Under 'Encryption method,' select 'Strong (AES-256)'

If you'd like to use the same password for every file you encrypt, you can enter it in the filed just below 'encryption method'. If you don't supply a password, BetterZip will prompt you for one each time you zip and encrypt a file.

BetterZip is impressive for encrypting every zip file you create. If you're looking for a simpler approach, Archiver is the app you're looking for. It uses a drag-and-drop interface, and makes encryption as easy as checking a box and assigning a password. Here's how:

  1. Open Archiver on your Mac
  2. Drag the file you want to zip into the app
  3. Select 'encrypt' if you want to secure the file with a password
  4. Enter and verify your password
  5. Select 'Archive'

How to add files to an existing zip file

BetterZip is your best path forward for adding files to an already zipped file. Here's how it's done:

  1. Open BetterZip on your Mac
  2. Select the zipped file you want to add new files to
  3. Select 'Add' from the top of the betterZip window
  4. Select the file or files you'd like to add to your already zipped file
    Note: If you want to add multiple files, you can shift-click to add a list, or command-click to add them one at a time.
  5. Select and hold 'Save' from the top left of the BetterZip window
  6. In the menu that appears, select 'Clean and Zip'

This creates a new .zip folder with the already-zipped file, as well as the files you added, all of which are now zipped in the same folder.

Unzip files on a Mac

Unzipping files on your Mac is simple. The best method is using the built-in Archive Utility app. The process is simple, and essentially a reversal of the process for zipping a file. Here's how to unzip files:

  1. Right-click the zipped folder or file you'd like to unzip
  2. Select 'open with'
  3. Select 'Archive Utility'

The zipped file or folder will be unzipped. If you'd like to re-zip the file, simple follow the steps we've outlined in this article to zip it again.

Multiple

How to open zip files as a pro

To open zipped files and folders, both BetterZip and Archive are great options. We especially like BetterZip, here, because each zipped file or folder is previewed in the BetterZip window before you open it up. That way, you always know what you're about to open!

Here's how to unzip files using BetterZip.

  1. Open BetterZip
  2. Select the zipped file or folder you want to unzip
  3. Select 'Extract' from the top of the BetterZip window

Your file or folder will be unzipped.

Here's the method if you choose Archive:

  1. Open Archive on your Mac
  2. Select the zipped file or folder you want to unzip
  3. Drag it to the Archive window
  4. Select it from the menu
  5. Select 'Extract' from the bottom of the Archive window

That's all it takes!

Look inside the archive without extraction

Viewing a zipped file without actually unzipping it can be important if you have many zipped files on your computer, or have zipped folders and can't remember where you stuck a particular file.

For this, we like BetterZip. It automatically offers up a preview of zipped files and folders on the right side of its screen. There's no guessing, or fussy methodology. All you have to do is select the file in BetterZip, and the preview loads immediately.

Extract a separate file from a zip archive

Again, we really like BetterZip for this. Here's how to do it:

  1. Open BetterZip on your Mac
  2. Select the zipped folder with the file(s) you want to extract
  3. Right click the file you want to extract
  4. Select 'Extract Selected' from the drop-down menu

Unzip files and folders using Terminal

If you would rather unzip files using the Terminal, here's how to do it:

Zip File Format Mac

  1. Open Terminal on your Mac
  2. Change directory to where your zipped file or folder is located using the 'cd' command. (As an example, if your zipped file were in the documents folder, you would enter 'cd documents' into Terminal – without the quotations. Keep in mind if your zipped file is buried in another folder, you will have to change directory until you reach the file's location.)
  3. Enter the following command: unzip [filename]. (If your file were named zipped-stuff.zip, you would enter 'unzip zipped-stuff.zip' – again, no quotations.)
Setapp uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy.

Split Zip Into Multiple Files Mac