>>>>> "Barry" == HP-Israel,ex1  <SHULTZ> writes:

    Barry> Hello, I've just been using Ruby for a few days, so please
    Barry> bear with me.  I want to copy a file using the 'system'
    Barry> function. I am running Win NT4, SP5 and have tried:

    Barry> system 'copy file newfile' 
    Barry> system 'cp file newfile' 
    Barry> system "copy file newfile"
    Barry> system "cp file newfile"

    Barry> The copy is never performed, and the value of $? is 32512.
    Barry> Any help would be appreciated.


I would guess that you have to use something like:

  system 'cmd /c copy file newfile'

as 'copy' is not an external but an internal command of the command
interpreter 'cmd.exe'.

But you could also do it like that:

  require 'ftools'
  File::copy 'file', 'newfile'

That should be more portable than you trial with 'copy'.

    Barry> Regards, Barry

HTH,
\cle