FlyerTalk Forums - View Single Post - A fast way to rename lots of files?
View Single Post
Old Aug 3, 2009 | 7:43 pm
  #13  
Dodge DeBoulet
 
Join Date: May 2004
Location: Exclusively OMNI/PR, for Reasons
Posts: 4,186
Can I play too?

c> perl -e "opendir DIR,q(.);foreach (readdir DIR) {rename $_,sprintf q(%4d-%02d-%02d%s),$3+2000,$1,$2,$4 if m/(\d+)-(\d+)-(\d+)(.*)/}" *

Of course, Perl is mandatory
Dodge DeBoulet is offline