Renaming multiple files en masse?

Brian Somers brian at
Wed Apr 12 00:05:54 BST 2000

> sorry couldn't resist..(as its only a suffix change..)
> sh -c 'for fname in *.html ; do mv $fname ${fname%.html}.htm ; done'

This is the best answer - as it uses no external commands - just the 
``mv''.  But bear in mind, most ``sh''s don't do % or # matching.
Brian <brian at>                        <brian@[uk.]>
      <>                   <brian@[uk.]>
Don't _EVER_ lose your sense of humour !

More information about the Ukfreebsd mailing list