From: Trans Date: 2006-08-14T08:15:06+09:00 Subject: Re: sh command that ascends dir tree for executable Jeffrey Schwab wrote: > Trans wrote: > > Thanks Jeffrey and Ken. I was thinking maybe there was a util for this > > already but I suppose not. I wrote code like this: > > > > Dir.chdir('..') until File.exectuable?( file ) > > > > It does change the directory, but for my purposes that's okay. See any > > problems with that? Work with Windows okay? > > It'll loop forever if the file doesn't exist. Dir.chdir('..') until File.exectuable?( file ) or Dir.pwd == '/' Will that work on Windows? If not what do I need to match? Thanks, T.