From: William Stevens Date: 2006-05-04T05:20:51+09:00 Subject: Re: can a ruby script perform a chdir on win xp? Hi, A simple but not so pleasing method is: Dir::chdir("c:\\") system("cmd") this will spawn a new command line with the inherited path. Bill Stevens Bill Guindon wrote: > I want to run a ruby script, and end up in a different directory. > Possible? > > All of the obvious approaches (%x, ``, system()) can change > directories, but only for their own process, once the script ends, > you're right were you started. > > For those who wonder 'why?'... I have a Rake task that sets up new > projects by building a project directory tree, and a couple of stub > files. When I run it, I want to end up inside one of the project > dirs. -- Posted via http://www.ruby-forum.com/.