in reply to Re: Re: Renaming bunches of files
in thread Renaming bunches of files
(Or if you are appalled by the find syntax, it may suffice tofind -name '*FOO*' -maxdepth 1 -print0 | xargs -r0 perl -MFile::Copy - +e 'for(@ARGV){ $a=$_; s/FOO/BAR/; move($a,$_) }'
though that won't cope with pathologically named files.)ls | grep FOO | xargs -r perl -MFile::Copy -e 'for(@ARGV){ $a=$_; s/FO +O/BAR/; move($a,$_) }'
Makeshifts last the longest.
|
|---|