Ruby Rename
Thursday, July 26th, 2007Warning: Undefined variable $excerpt in /home/wonko/www/www/blog/wp-includes/deprecated.php on line 1717
You can write a "better renamer" in any scripting language, but I'm learning Ruby, so I thought i'd give it a go. I started with this basic one-liner I got from a friend alias rubyrename='ruby -e "a = ARGV.shift; b = ARGV.shift; ARGV.each{ |f| File.rename(f, f.gsub(a, b)) } "' I wanted to ...