ChrisH wrote:
> See inline comments
> On Aug 1, 8:25 am, Peter Bailey <pbai... / bna.com> wrote:
> ...
>> Dir.chdir("L:/tiff/cdtiff/00000")
>>   Dir.glob("*.tif").each do |tiffile|
>>From the docs look like it creates an array of matched filke names
> then
> iterates, placing current filename in tiffile...
> 
>>   File.rename(tiffile, tiffile.downcase)
> Rename the file to be lowercase, value in tiffile(and in the array
> created by Dir.glob) is unchanged...
> 
>>   pdffile = File.basename(tiffile, ".tif") + ".pdf"
> I think base name is case sensitive, so ".tif" does not match '.TIF'
> so .pdf is appended instead
> of replacing '.TIF'
>>   puts "#{tiffile}  #{pdffile}"
>> end
>>
> 
> When you go look at the directory the files are in lowercase because
> your script has made them so.
> Have you tried re-running on the dir of lower-case names?
> 
> Cheers
> Chris

I don't understand. Yes, I've made them lower-case, and then, I'm just 
listing them. I'm a Windows guy and this whole case business is new to 
me, but, I'm learning to have to deal with it. That's why I lower-cased 
all the files to start with. So, if they're lowercase, why would they 
display as upper-case?
-- 
Posted via http://www.ruby-forum.com/.