From: Thomas Luedeke Date: 2013-05-14T12:04:51+09:00 Subject: Re: copying files syntax with FileUtils.rb (grr.) Two things: (1) I still have trouble with this. I'm following Doug's example, and I'm getting this exception about the target directory. The script output: The file to be moved is "/home/t3905/codes/xcobra/ddec12/nhyd_mod/build/new_build/mod_files/ANF1_diff_wb" The destination file is "/home/t3905/codes/xcobra/ddec12/nhyd_mod/build/new_build/hp/file_diff/source_diff/ANF1_diff_wb" So the current file plus path and destination file plus path are all set. Now I simply do the FileUtils.cp (or .mv) using the regular syntax. Naturally, it does not work: Exception `Errno::ENOENT' at /home/t3905/ruby/ruby-1.8.7-p22/lib/ruby/site_ruby/1.8/fileutils.rb:1420 - No such file or directory - /home/t3905/codes/xcobra/ddec12/nhyd_mod/build/new_build/hp/file_diff/source_diff/ANF1_diff_wb Why is it puking about the destination file not existing? That's why I'm trying to move it.. (2) I have no idea why I should continue fighting this, when I can simply utilize a system command that I *never* have to fight with. Using a UNIX cp works simpler and easier on both Linux and other UNIX platforms, and I never have any problems with it. Never. -- Posted via http://www.ruby-forum.com/.