From: Dave Burt Date: 2005-09-14T06:36:33+09:00 Subject: Re: find executables on windows > since, afaik, PATHEXT does not imply some sort of ordering or precedecne. > seem right? The order _is_ important. With PATHEXT=.com;.exe;.bat..., foo.com will be preferred to foo.exe, which in turn will be preferred to foo.bat, etc. Loop through PATH first (prepend "."), PATHEXT second, both in order. Cheers, Dave