ghutchinson / sk.sympatico.ca (Greg Hutchinson) wrote in message news:<851acb31.0112041109.42535888 / posting.google.com>...
> I am running under
> Window NT 4.0
> 
> Other environment info
> J:\>c:\ruby\bin\ruby -v
> ruby 1.6.5 (2001-09-19) [i386-cygwin]
> 
> J:\>dir j:\*.txt
> Volume in drive J has no label.
> Volume Serial Number is 3874-7E1F
> 
> Directory of j:\
> 
> 12/03/01  04:31p                 1,648 abc.txt
> 12/04/01  11:09a                     0 d.txt
> 12/03/01  04:31p                 1,648 output.txt
> 
> Now if I execute the following ruby program
> 
> cmd = "cmd /C copy j:abc.txt d.txt"
> #cmd = "cmd /C copy j:\\abc.txt d.txt"
> #cmd = "cmd /C copy \*.txt d.txt"
> 
> if system(cmd)
>   puts "true"
> else
>   puts "false"
> end
> 
> The file abc.txt gets copied to d.txt and true gets printed.
> 
> However, if I uncomment any of line 2 or 3 in the program, false gets
> printed.
> I am probably doing something really stupid here, but I seem to be stuck. I
> have tried other options but can not seem to get a fully qualified path
> parameter (or wildcard) to work.
> What I would ideally like is
>     cmd = "cmd /C copy *.* d:\\"
> Any help is appreciated. Thanks.
> ... Greg ...

have you tried using forward slash / instead of backslash \ in your path?