'gets' OS commands?

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!

On 12/28/06, woodyee [email protected] 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