Caution filename not matched when unzipping multiple files

Fix for “caution: filename not matched” error when trying to unzip multiple files at once in Terminal.

Solution for unzipping multiple zip files with a single command.

Open up a Terminal window on OS X, go to the directory containing the zip files and enter this command:

unzip \*.zip

The forward slash escapes (prevents) the wildcard character (the “*”) from being expanded by bash shell interpreter. In English: the files in the directory are the filenames “unzip” is trying to extract from the first file it finds when using “*”.

Example:

/myzips directory contains zip files: first.zip second.zip third.zip

Trying to run: “unzip *.zip” will cause the unzip program to take “first.zip” as the archive to play with, and will look for files “second.zip” and “third.zip” within “first.zip” to expand/extract. Obviously not what you want to do.

Not escaping the * character will result in errors like: “caution: filename not matched”.


Apple Online Store

Related posts:

  1. Fix Blue Tint Wake from Screensaver Mac / Macbook
  2. Fix Front Row Crash while playing divx avi
  3. No Sound in QuickTime with DivX Movie Files

Tags: , ,

This works on Linux too. Thanks for the tip.

Lucky for us, BSD, the base of Mac OS X, has many similarities to Linux.