Batch File Rename

by Kyle on

Leave off the final pipe to /bin/sh to test:

ls foo*.jpg | awk '{ print("mv "$1" "$1) }' | sed 's/foo/bar/2' | /bin/sh

Replace Spaces In File Names With Underscores

by Kyle on

find . -type f -iname "*.mp3" -exec rename "s/ /_/g" {} \;

Hide Sidebar