Lowercase Filenames With Ruby

Posted by admin Fri, 28 Jan 2011 12:31:00 GMT

ruby -e 'Dir.glob("*").each { |fn| File.rename(fn, fn.downcase) }'

Obviously this would work with method #upcase as well.

Credit goes to poster "Florian Gilcher", here:

http://www.eggheadcafe.com/software/aspnet/35719452/oneliner-for-lowercasing-files.aspx

Posted in ,  | Tags ,  | no comments | no trackbacks