'gets' OS commands?

Discussion in 'Ruby' started by woodyee, Dec 28, 2006.

  1. woodyee

    woodyee Guest

    Hi! I'm creating a little program for myself:

    # Have user enter a directory in Windows (ex., C:\ or C:\Windows, etc)
    # Have the user search the directory for .txt files
    # Have user pick a file to read

    I'm stuck at #1! Yikes! How can I get a user to input a command (like
    "Dir.chdir")? Thanks!
     
    woodyee, Dec 28, 2006
    #1
    1. Advertising

  2. On 12/28/06, woodyee <> wrote:
    > Hi! I'm creating a little program for myself:
    >
    > # Have user enter a directory in Windows (ex., C:\ or C:\Windows, etc)
    > # Have the user search the directory for .txt files
    > # Have user pick a file to read
    >
    > I'm stuck at #1! Yikes! How can I get a user to input a command (like
    > "Dir.chdir")? Thanks!


    I usually use fileutils.

    http://www.ruby-doc.org/stdlib/libdoc/fileutils/rdoc/index.html

    Maybe Highline would be helpful for the interface, too:

    http://highline.rubyforge.org/

    Warm Regards,
    greg
     
    Gregory Brown, Dec 28, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Mueller
    Replies:
    5
    Views:
    526
    Steven Saunderson
    Jul 10, 2006
  2. Ben Pfaff

    Re: man pages for C commands (GCC commands)

    Ben Pfaff, Jun 24, 2003, in forum: C Programming
    Replies:
    4
    Views:
    3,977
    Thomas Stegen
    Jun 28, 2003
  3. John Joyce

    gets gets

    John Joyce, Mar 26, 2007, in forum: Ruby
    Replies:
    2
    Views:
    355
    John Joyce
    Mar 26, 2007
  4. John Joyce

    Return of gets gets

    John Joyce, Apr 23, 2007, in forum: Ruby
    Replies:
    0
    Views:
    196
    John Joyce
    Apr 23, 2007
  5. libsfan01
    Replies:
    5
    Views:
    246
    Jeff North
    Dec 20, 2006
Loading...

Share This Page