#!/usr/bin/env zsh setopt ERR_EXIT EXTENDED_GLOB for i (**/new) { pushd $i for m (*(N)) mv -v $m ../cur/"$m":2,S popd }