From: Kga Agk Date: 2009-06-29T23:09:04+09:00 Subject: Re: External prog get file from main dir, want file in diff dir Jamis Buck wrote: > Dir.chdir() should do what you want, e.g.: > > system("pwd") > Dir.chdir("CaseX") { system("pwd") } > > Within the block, the working directory is the argument to Dir.chdir. > When the block finishes, the working directory is automatically reset > to what it was before. > > - Jamis A million thanks. It worked. -- Posted via http://www.ruby-forum.com/.