"Bill Guindon" <agorilla / gmail.com> writes:

> On 4/29/06, Lloyd Zusman <ljz / asfast.com> wrote:
>> Daniel Berger <djberg96 / gmail.com> writes:
>>
>> > Robert Klemme wrote:
>> >> 2006/4/29, Bill Guindon <agorilla / gmail.com>:
>> >>
>> >>> I was hoping for a simpler solution, but that'll work.
>> >>> Thanks much.
>> >> I don't know why this complex stuff was suggested.  Dir.chdir does the
>> >> job - or am I missing something?
>> >
>> > Dir.chdir doesn't change your directory in the shell it's running in
>> > after the program has finished.  That's what he was after I think.
>>
>> Unfortunately, no program running in any language can change the
>> directory in the shell it's running in, after the program has finished
>> [ ... ]
>>
>> [ ... ]
>>
>> This is a function of how the operating system is designed.  It's true
>> for windows-based systems as well as unix-like systems.
>
> Thanks for the detailed answer.
>
> That was pretty much my thinking on it, but I was doing some wishful
> thinking that there was some clever way to get around it.  The batch
> file approach will work, but it's just not as elegant as I'd like. Was
> also wondering if there was some Win32 call that might pull it
> off.

Well, back in the days of MS-DOS, an executable program could go through
your system's memory and find the place where the shell stored its idea
of the current working directory, which the program could then change.
But with the OS's that are built on top of the winnt architecture, those
days are gone, as far as I know.


-- 
 Lloyd Zusman
 ljz / asfast.com
 God bless you.