.cmd files not flagged as executable on NT

Benjamin Riefenstahl benny@crocodial.de
Sun Jan 31 23:52:00 GMT 1999


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@crocodial.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@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list