On Nov 12, 3:06=A0pm, Siep Korteling <s.kortel... / gmail.com> wrote:
> dkmd_nielsen wrote:
> > I don't know what to do. =A0I have an environment variable, PW_PATH,
> > that contains the folder names where applications can be executed
> > from. =A0I want to start a particular application that is in one of
> > those folders. =A0I currently use the following:
>
> > =A0 =A0 =A0 system("presort /a /nos /watch #{template[0]}") =A0# submit=
 the
> > presort to run
>
> > This works when the contents of PW_PATH are added to the PATH
> > variable. =A0But I would like to avoid that if I can. =A0I guess my
> > questions are: =A0How do I first acquire the contents of PW_PATH? =A0Ho=
w
> > do employ the contents as a temporary addition to PATH so that system
> > can submit the application and it will be found and executed?
>
> > Suggestions? =A0Comments? =A0Observations? =A0All are appreciated.
>
> > dvn
>
> ENV contains all environment variables; ENV['PW_PATH'] is the content of
> PW_PATH. So this might be sufficient:
>
> system("#{ENV['PW_PATH']/presort /a /nos /watch #{template[0]}")
>
> hth,
>
> Siep
>
> --
> Posted viahttp://www.ruby-forum.com/.

Thanks, Siep.  I will give this a shot.  Not sure if linux and windows/
dos will treat it the same, but I guess that's my job to figure out.