From: "Marvin Gülker" Date: 2010-05-18T03:13:21+09:00 Subject: Re: opening my files with a ruby program Mark Kirby wrote: > i was just wondering if i wanted my program to open a file on my pc what > would i put for example if i wanted to use ruby irb to open media player > thanks You've to find out what the Media Player's executable is named and if it accepts the filename as a command-line argument. That said, I'm assuming the executable is called "mplayer" and your file "myfile.ogg". system("mplayer", "myfile.ogg") That blocks until the mplayer process exits, so you may want this instead: #On *nix spawn("mplayer", "myfile.ogg") #On Windows or *nix IO.popen("mplayer myfile.ogg") How to find out the executables name: Right-click on your favourite starting icon, choose something like "Settings", look what command it runs or what goal it points to and use that instead of "mplayer" in my example. And you may think about using punctuation? Marvin -- Posted via http://www.ruby-forum.com/.