From: Daniel Berger Date: 2010-10-20T05:08:58+09:00 Subject: Re: Separator in $PATH On Oct 19, 2:02 pm, Stefano Mioli wrote: > Hello everyone, >         Unix-like operating systems use a colon to separate each directory in > the PATH, while Windows uses a semicolon. > > The question is: is there some class in the Ruby library that knows > about this difference? File::PATH_SEPARATOR > I'm asking this question because I need to figure out if a given > executable is in the path and, if it does, retrieve its full path. require 'ptools' File.which('ls') # => '/bin/ls' Works on Windows, too, with or without an extension: File.which('notepad') # Works File.which('notepad.exe') # Also works Regards, Dan