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”.
Related posts:



2 comments
Comments feed for this article
Trackback link
http://installingcats.com/2008/05/23/caution-filename-not-matched-unzipping-multiple-files/trackback/
December 24, 2008 at 4:44 pm
Peezee
This works on Linux too. Thanks for the tip.
December 25, 2008 at 7:19 am
Ben Lam
Lucky for us, BSD, the base of Mac OS X, has many similarities to Linux.