From: Rob Biedenharn Date: 2009-02-23T11:28:05+09:00 Subject: Re: FileUtils.mv behaving not as documented On Feb 22, 2009, at 8:06 PM, Alex DeCaria wrote: > The documentation for FileUtils.mv(src, dest) says that if src and > dest > are on different disk partitions then it is supposed to act as a copy > instead. But when I use it to copy a file from the "C:" drive to a > flash drive or mp3 player using another drive letter such as "E:" it > moves it and doesn't copy it as advertised. Is this a bug, or is the > documentation incorrect? I am using Ruby 186-26 on Windows. > > -Alex I think that the difference the documentation is attempting to point out is that a mv on a single partition just changes names and pointers in directory entries so it makes no difference the size of the file. On different partitions, the size of the file will matter because the effect is a copy followed by an unlink of the original file. If you want to copy, call FileUtils.cp If you want to move, continue to call FileUtils.mv -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com