osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to detect if a file is executable on Windows?


> I could also use the 2 first bytes of a file and determine if the file
> is a binary because on Windows, the executable files start with b'MZ'.

Is .bat executable?