Wednesday, September 29, 2010

How to rename files with single command?

find . -type f -name '*<current_string>*.*' | perl -nle'$o=$_; s/<current_string>/<new_string>/g; rename $o,$_;'

No comments:

Post a Comment