Dotan Cohen wrote:
I googled "Windows determine file type" (sans quotes) and got any number of
interesting looking responses. So there may be something out there that is
"lighter" than cygwin. The first entry is
http://gnuwin32.sourceforge.net/packages/file.htm which really does look
promising as, apart from anything else, its free and from Sourceforge,
always a good sign IMHO.
So Windows really only relies on filename extensions? What about
improperly named files? Malicious files? That seems... irresponsible /
frustrating.
If the OP wants to send to me the files in private mail I will examine them.
If you deliberately or by accident attempt to change the file extension,
Windows will warn that if you change the file extension "you may make
the file unusable." I would conclude that Windows uses the file
extension only to decide what is to open the file.
Irresponsible? No more so than Unix that will happily try to execute a
file regardless of name -- if the permissions allow.
I'm sorry to find myself defending the practice of using file extensions
to determine file type for I abhor the practice.
In Windows, there are many cautions about malicious software being
delivered that looks like files have other types.
With Warmest Regards
David Teague