From: Dave Burt Date: 2006-03-15T13:53:45+09:00 Subject: Re: xcopy doesn't work inside ruby? Dave Cantrell wrote: > 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" You need to escape your backslashes: irb> "xcopy /s a\*.* b\*.*" => "xcopy /s a*.* b*.*" irb> "xcopy /s a\\*.* b\\*.*" => "xcopy /s a\*.* b\*.*" You might also consider Ruby's FileUtils.cp(). (I haven't used it, but it's there.) Cheers, Dave