P
Peter Bailey
This is a simple script that I'm just using for something bigger in the
near future, kind of a test. I'm looking in a directory of TIFF files,
lower-casing the filenames, and then listing them with PDF named
counterparts. The script works fine until about 3/4 of the way down the
list and, all of a sudden, it displays the TIFF files in uppercase. If I
go into the directory itself, those "upper-case" names are actually
lower-case as filenames. Why is it doing this?
Thanks,
Peter
Dir.chdir("L:/tiff/cdtiff/00000")
Dir.glob("*.tif").each do |tiffile|
File.rename(tiffile, tiffile.downcase)
pdffile = File.basename(tiffile, ".tif") + ".pdf"
puts "#{tiffile} #{pdffile}"
end
gives me:
...
va997.tif va997.pdf
va998.tif va998.pdf
WI679.TIF WI679.TIF.pdf
WI680.TIF WI680.TIF.pdf
WI681.TIF WI681.TIF.pdf
...
near future, kind of a test. I'm looking in a directory of TIFF files,
lower-casing the filenames, and then listing them with PDF named
counterparts. The script works fine until about 3/4 of the way down the
list and, all of a sudden, it displays the TIFF files in uppercase. If I
go into the directory itself, those "upper-case" names are actually
lower-case as filenames. Why is it doing this?
Thanks,
Peter
Dir.chdir("L:/tiff/cdtiff/00000")
Dir.glob("*.tif").each do |tiffile|
File.rename(tiffile, tiffile.downcase)
pdffile = File.basename(tiffile, ".tif") + ".pdf"
puts "#{tiffile} #{pdffile}"
end
gives me:
...
va997.tif va997.pdf
va998.tif va998.pdf
WI679.TIF WI679.TIF.pdf
WI680.TIF WI680.TIF.pdf
WI681.TIF WI681.TIF.pdf
...