From: Bill Guindon Date: 2006-04-30T11:57:42+09:00 Subject: Re: can a ruby script perform a chdir on win xp? On 4/29/06, Lloyd Zusman wrote: > "Bill Guindon" writes: > > > On 4/29/06, Lloyd Zusman wrote: > >> "Bill Guindon" writes: > >> > >> > > >> > I like the look of it, but it's not working here: > >> > > >> > c:\work\active\apps>cdir.bat > >> > (`cdir.rb`) was unexpected at this time. > >> > >> Hmm ... I wonder if this needs to run in a .cmd file instead of a .bat > >> file. Under winxp, it works for me in a .cmd file exactly as written. > >> Maybe if you rename your file to be cdir.cmd ... ??? > >> > > > > Same results. Deleted the .bat file, and called it explicitly > > (cdir.cmd) to make sure. > > Actually, I had to do this: > > `\path\to\ruby.exe cdir.rb` instead of just `cdir.rb` > > I accidentaly copied and pasted the command line that I posted here from > an earlier version that didn't work. I'm sorry for the confusion. > > But if even this doesn't work for you, then someone more familiar with > windows will have to jump in here. Unfortunately, I spend most of my > time in unix-based systems and I'm not sure where to go from here. Nope, that didn't help (yet). Not sure that 'unfortunately' applies here btw ;) > But I'm sure that this is do-able in windows, one way or the other. I'm inclined to agree, and thanks much for trying. If nothing else, you gave me food for thought, and a couple of search terms. Already found some new toys, had never heard of pushd or popd, handy to have around. > > -- > Lloyd Zusman > ljz@asfast.com > God bless you. > -- Bill Guindon (aka aGorilla) The best answer to most questions is "it depends".