Windows Shell Commands

  • Thread starter Boris \BXS\ Schulz
  • Start date
B

Boris \BXS\ Schulz

Hi,

how can i use windows shell commands with ruby ?
I would like to call existing command line programs with parameters
given by ruby.
I am a scripting newbie and tried to look in google but could not find
anything, most likely my search terms were wrong.

greetings, BXS
 
R

Robert Klemme

Boris "BXS" Schulz said:
Hi,

how can i use windows shell commands with ruby ?
I would like to call existing command line programs with parameters
given by ruby.
I am a scripting newbie and tried to look in google but could not find
anything, most likely my search terms were wrong.

greetings, BXS

system( 'cmd', '/c', 'dir' )
system( 'cmd', '/c', 'dir', 'c:\\temp' )

etc.

robert
 
J

Josef 'Jupp' Schugt

* Robert Klemme; Thu, 6 Nov 2003 10:01:00 +0100
"Boris "BXS" Schulz"

system( 'cmd', '/c', 'dir' )
system( 'cmd', '/c', 'dir', 'c:\\temp' )

etc.

I don't have any idea how to use 'system' to control the Windows
shell(*). Did you leave that question unanswered or can one access
WSH using 'system'? How?

(*) Perhaps I am just misunderstanding the question. Perhaps Boris
does call the CLI (in German it is called 'Eingabeaufforderung')
that way. In MS terminology it is another name for Explorer.

Josef 'Jupp' Schugt
 
R

Robert Klemme

Josef 'Jupp' Schugt said:
* Robert Klemme; Thu, 6 Nov 2003 10:01:00 +0100


I don't have any idea how to use 'system' to control the Windows
shell(*). Did you leave that question unanswered or can one access
WSH using 'system'? How?

(*) Perhaps I am just misunderstanding the question. Perhaps Boris
does call the CLI (in German it is called 'Eingabeaufforderung')
that way. In MS terminology it is another name for Explorer.

IMHO Boris wanted to know how to access cmd.exe and other command line
oriented programs. At least that's the question I answered. :)

Addtional info: there is WIN32OLE which can be used to control
applications such as MS Word, Explorer etc. But I didn't use that and so
I can't comment on those.

Regards

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,139
Messages
2,570,806
Members
47,356
Latest member
Tommyhotly

Latest Threads

Top