#!/bin/bash SRCDIR=/home/martti/Arnold\ repository/pub/games DESTDIR=/home/martti/Roms/C64/arnold # searches through the SRCDIR find "$SRCDIR" -name '*.zip' -printf '%P\n' |\ while IFS= read -r; do # Evaluate Target # Remove Extensions UNZIPDIR="$DESTDIR"/"${REPLY%.*}" # Make Dirs mkdir -p "$UNZIPDIR" # Unzip it to that place... unzip "$SRCDIR"/"$REPLY" -d "$UNZIPDIR" done