From: Peter Bailey Date: 2009-12-15T03:04:53+09:00 Subject: Re: one-liner for lowercasing files Still no good. Here's what I get: >ruby -e 'Dir.glob("*.*").each { |fn| File.rename(fn, fn.downcase) }' 'fn' is not recognized as an internal or external command, operable program or batch file. E:\Asura-Non\BWDhelp\temp> Florian Gilcher wrote: > On Dec 14, 2009, at 1:17 PM, Peter Bailey wrote: > >> Thanks, Brian. Yes, it's just filename I want, not content. But, >> this is >> what I get when I try your suggestion: >> >>> ruby Dir.glob("*").each { |fn| File.rename(fn, fn.downcase) } >> 'file' is not recognized as an internal or external command, >> operable program or batch file. > > Try > > ruby -e 'Dir.glob("*").each { |fn| File.rename(fn, fn.downcase) }' > > Otherwise, Dir.glob... will be seen as a shell command, not as ruby > code. > > Regards, > Florian -- Posted via http://www.ruby-forum.com/.