Your skill will accomplish what the force of many cannot |
|
PerlMonks |
(zdog) Re: (2) how to rename all files in a dirby zdog (Priest) |
on Jul 07, 2002 at 15:49 UTC ( [id://179983]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|