If you don't get the relative path you can't move the file, because you 
won't know where to find it.
The directory itself is not passed because line only moves the files, 
not directories:

File.rename File.absolute_path(fname), 'D:/document/' +
File.basename(fname)

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