http://qs321.pair.com?node_id=179983


in reply to (jeffa) Re: how to rename all files in a dir
in thread how to rename all files in a dir

In case there is no specified file extension like .txt, something like this can be done:

perl -e 'for (grep {-f} <*>) { rename $_, sprintf("%02d%s", ++$i, $_) }'

Zenon Zabinski | zdog | zdog@perlmonk.org