From: Lloyd Zusman Date: 2006-04-30T08:02:47+09:00 Subject: Re: can a ruby script perform a chdir on win xp? Elliot Temple writes: > On Apr 29, 2006, at 3:44 PM, Lloyd Zusman wrote: > >> Unfortunately, no program running in any language can change the >> directory in the shell it's running in, after the program has finished >> ... assuming that the program is invoked as a process that is separate >> from that of the shell (which is how ruby is invoked). > >> >> This is a function of how the operating system is designed. It's true >> for windows-based systems as well as unix-like systems. > > I probably just don't understand what you meant, but what about the > "cd" program? Is that somehow not separate from the shell? "cd" is not a program. It's a command that is implemented within the shell. In other words, the shell itself interprets the "cd" (or "chdir", which is equivalent), and it causes the shell to change its idea of the current working directory. -- Lloyd Zusman ljz@asfast.com God bless you.