'gets' OS commands?

W

woodyee

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!
 
G

Gregory Brown

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
 

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,221
Messages
2,571,134
Members
47,748
Latest member
LyleMondra

Latest Threads

Top