From: Rolando Abarca Date: 2008-11-13T09:20:58+09:00 Subject: Re: Need tutoring on using a path environment variable On Nov 12, 2008, at 6:22 PM, dkmd_nielsen wrote: > Let's provide more information. The contents of pw_path include this: > > C:\PW\firstprep;C:\PW\rapid\docs;C:\PW\la;C:\PW\rapid;c:\pw\pst; > > And the application I want to execute is presort.exe, which is located > in c:\pw\pst; > > I would like to be able to tell the O/S you have to look in the above > folders to find presort.exe, just as you would using PATH. In a > sense, I would like to temporarily merge the contents of pw_path into > the search path of PATH. > > Is that better? you can always store the path before and reset it after the system call: old_path = ENV['path'] ENV['path'] << ENV['PW_PATH'] system(...) ENV['path'] = old_path > dvn regards, -- Rolando Abarca M.