I need to send some graphics file over to UNIX land, but, without an
extension. So, I rename the files and try to send them, and, Ruby
complains that the file isn't there. Why is it that a file rename
doesn't continue to be legitimate with the original variable name? When
it's time to "put" the file, Ruby says that the file doesn't exist, I
guess because it still think that the variable is pointing to the file
with the extension. What's the point of File.rename if the files can't
stick with the variable names?

Thanks a lot,
Peter


require 'net/ftp'
...

Dir.glob("*.100").each do |arborfile|
  File.rename(arborfile, File.basename(arborfile, ".100"))
  ftp.putbinaryfile(arborfile.downcase)
...

-- 
Posted via http://www.ruby-forum.com/.