From: Pistos Christou Date: 2006-05-02T13:48:09+09:00 Subject: Re: Just need a clue Alan wrote: > Hi, > > I want to replace some DOS batch scripts with Ruby scripts. > > Could you give me a clue how can I execute a .EXE file within Ruby > script and also how can I check the errorlevel? > > Any help would be appreciated, > Alan See the various Kernel methods, such as system: http://www.ruby-doc.org/core/classes/Kernel.html#M002992 "Executes cmd in a subshell, returning true if the command was found and ran successfully, false otherwise. An error status is available in $?. The arguments are processed in the same way as for Kernel::exec." -- Posted via http://www.ruby-forum.com/.