Luis Lavena wrote in post #967959:

Hey, Luis. Thanks for the welcome!

But it didn't work; I've used single forward slashes, double forward 
slashes, single backslashes and double backslashes. Nothing happened. On 
IRB prompt the Dir did work, indeed.

Maybe it helps to say I'm using ruby 1.9.2p0 and editing the program in 
SciTE?

> Download 0 files is part of the script, correct?

Yes. Comes from this command:

print "Downloading #{pic_names.length} files: "

This is the full program:

Dir.chdir ('D:/Fotos')
pic_names=Dir['G:/DCIM/100HP960/*.{JPG.jpg}']
puts 'What would you like to call this batch?'
batch_name=gets.chomp
puts
print "Downloading #{pic_names.length} files: "
pic_number=1
pic_names.each do |name|
  print '.'
  new_name=if pic_number<10
    "#{batch_name}0#{pic_number}.jpg"
    else
    "#{batch_name}#{pic_number}.jpg"
  end
  File.rename name, new_name
  pic_number=pic_number+1
end
puts
puts 'Done!'

Thanks once again!

Best,

Marcelo.

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