Rename and Iconv are like Chocolate and Peanut Butter

perl camel

The features of iconv are probably built into Perl rename (aka prename), but when I tried the example from the man page, it kept generating an error message. I presume this is due to a missing Perl module. Here’s the error:

So I suppose if we don’t care much about speed then we can just use an external utility like iconv to help convert a whole bunch of crap file names to something a little more universally-digestible. Change to the directory with the unfriendly file names and then run this rename and iconv combo to bulk rename them:

I just renamed over two thousand files with this so I haven’t looked at all of them, but so far it looks like it’s done a great job.

rename 0.3 you can find here: http://www.perlmonks.org/?node_id=303814, but I got it from homebrew.

Author: Charlie Herron

Denizen of Portland, Maine; tech jack; lover / hater / whatever; philosophical dabbler.

http://twitter.com/realgeek