Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running the command:


Gives me: Bourne shell script text executable

in Linux. Is there an equivalent command in Windows?

share|improve this question

migrated from Apr 18 '11 at 14:16

This question came from our site for professional and enthusiast programmers.

This is a QA forum. Not Google. You should try searching before just asking people here. - – Noufal Ibrahim Apr 18 '11 at 8:32
@Noufal: No, you shouldn't. Q&A means that you ask questions. This is a question. Q&A doesn't imply anything about searching first. – Cody Gray Apr 18 '11 at 8:33
Cody: Arguably. I still think some research before firing off a question is a good thing. – Noufal Ibrahim Apr 18 '11 at 8:35
Sorry people, but i tried google and then I asked this question here. – Abhishek Simon Apr 18 '11 at 8:39
The file command is not part of the Linux kernel per say. It's a package that's installed on most distributions by default. Windows doesn't have something like this. Most decisions there are taken based on file extensions rather that content. – Noufal Ibrahim Apr 18 '11 at 10:17
up vote 3 down vote accepted

There probably isn't one on your system by default. You could install the Cygwin tools suite (ports of GNU commands to the Win32 APIs). There used to also be the MKS Toolkit and another one whose name escapes me at the moment. MKS was commercial, Cygwin, of course was GNU/GPL, and the other won was eventually renamed (from OpenNT?) and later acquired by Microsoft and incorporated into some sort of MSDN suite for Win2K or Server 2003 or something like that.

For any of those you'd just run the 'file' command on your target files just as you would under UNIX. You might have to start them under the included UNIX-like shell (bash, for Cygwin, ksh or MKS Toolkit, and who knows what for the other one).

share|improve this answer
Hey thanks for the info, I heard about MKS too and worked on Cygwin, but then again I was wondering whether there is a tool that comes by default in windows. Thanks anyways :) – Abhishek Simon Apr 18 '11 at 9:05
I downloaded cygwin and then was able to copy the cygwin install directory to the system I wanted to run the file command on and was then able to call the file.exe command underneath the copied cygwin directory without "installing" cygwin on the target system. – Chris Magnuson Jan 31 '15 at 21:29

As others have said, there's nothing built into Windows. If you'd like an alternative to the file ports, check out TrID. The developer also makes the analyzer available as both a Win32 DLL or a .NET Assembly.

share|improve this answer
very nice. there is even an "online" scanner available that small files can be uploaded to. – user26398 Feb 11 '12 at 4:39

Not built-in; Windows uses file-extensions to determine file-type. I'm pretty sure that there's a port of file in Cygwin, though.

share|improve this answer
@nickgrim:,@skwllsp: I needed something that comes by default in every windows system. – Abhishek Simon Apr 18 '11 at 8:52
@nickgrim: This might be it, because windows uses file-extensions to determine file-type, so there is no built it command. If I happen to find a solution i'll post it here. Thanks all for your efforts :) – Abhishek Simon Apr 18 '11 at 9:08

Take a look at File.exe - a small program similar to the Unix / Linux file executable which can examine files, in this case it is designed to query an executable file and display the processor that the file was compiled to run on and any other details it can report on.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .