Hi gang,

I just tried the following in IRB:

irb(main):005:0> r = `xcopy /s a\*.* b\*.*`
Cannot perform a cyclic copy
=> "0 File(s) copied\n"
irb(main):006:0> r = `xcopy /d a\*.* b\*.*`
=> "0 File(s) copied\n"


But in a regular shell:

C:\Documents and Settings\Dev\Desktop\xcopytest>xcopy /s a\*.* b\*.*
a\1.file
a\2.file
a\3.file
a\4.file
a\5.file
a\files\1.file
a\files\2.file
a\files\3.file
a\files\4.file
9 File(s) copied


Both are run from the same directory, so irb shouldn't say that it can't 
find folder a.

irb(main):009:0> `dir`.each { |x| puts x }
  Volume in drive C has no label.
  Volume Serial Number is C48E-4DA2

  Directory of C:\Documents and Settings\Dev\Desktop\xcopytest

03/14/2006  10:33 PM    <DIR>          .
03/14/2006  10:33 PM    <DIR>          ..
03/14/2006  10:33 PM    <DIR>          a
03/14/2006  10:33 PM    <DIR>          b
                0 File(s)              0 bytes


Any ideas?

Thanks,
-dave

PS What I'm looking for is a way to backup data from one drive to 
another. If there's a helper library out there for this, great! If not, 
I'll build the script in Ruby and hand off the copying tasks to xcopy to 
do the dirty work. Much faster anyway, I'm sure.