From: benny AT crocodial DOT de (Benjamin Riefenstahl) Subject: Re: .cmd files not flagged as executable on NT 20 Jan 1999 15:28:10 -0800 Message-ID: <36A5B5FE.1069FF20.cygnus.gnu-win32@crocodial.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com Paul Murphy wrote: > As a compromise, until a better solution can be approximated, I suggest > that the FAQ be augmented to read something like this: > > Q: "Why do some files, which are not executables have the 'x' type, and > some that should, don't?" > > A: "When working out the unix-style attribute bits on a file, the library > has to fill out some information not provided by the WIN32 API. > > It guesses that files ending in .exe and .bat are executable, as are ones > which have a "#!" as their first characters. Files that end in .cmd are > not currently guessed to be executable, since this could be wrong on > Windows 95/98." > > ... > PATHEXT = `.COM;.EXE;.BAT;.CMD' Note that this environment variable is documented to be a list of extensions used by cmd.exe/command.com for a very similar purpose. It determines which extensions to try if a command doesn't have its own extension. So on my system C:>system gives me "command not found" error, while C:>system.ini starts the system.ini in notepad and C:>notepad starts a blank notepad. cygwin.dll could probably honor this variable. ====================================== Benjamin Riefenstahl (benny AT crocodial DOT de) Crocodial Communications EntwicklungsGmbH Ruhrstr. 61, D-22761 Hamburg, Germany - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".