I'm trying to make a workflow that automatically extracts image files out of .docx files, which are essentially .zip files. I've almost got it working... But I find that in Hazel, my script will only extract file extensions .png and .jpeg, and won't do .jpg (or, as I discovered while troubleshooting, .xml). Unzip grabs all file types when run through Terminal.
FILENAME="$1"
MYPATH=$(dirname "$FILENAME")
unzip -j "$1" *{.png,.jpeg,.jpg} -d "$MYPATH"
Fallback is to try an external shell script, but I thought I'd ask here first.