Renaming batch of files (with spaces) in linux

I rename a lot of files. Often by hand as it's just easier. I've tried various combinations of find -print0 | xargs -0, and find -exec, without much luck.

Just So I have reference on what does work:

find -type f | while read file; do echo mv \"$file\" \"$(echo $file | sed -e 's/^Old Content/New Content/')\"; done | sh

Yea I could probably drop the echo mv, and the |sh, but it feels safer to do a dry run




Updating Wordpress Plugins Helper


2013 In Review.
Gavin December 1989

Gavin Mogan

Hi. I'm Gavin. I'm a coder at Sauce Labs. At home I code, game, hang out, all the cool non robot things to do. #notarobot

Friends Sites