What is the equivalent to the Linux File command for windows?
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.
1. You can download and install git for Windows
It has a built-in file command in git-bash.exe
2. You can use Windows build of file
Link here https://github.com/nscaife/file-windows/releases
Or here https://github.com/julian-r/file-windows/releases
3. Try https://github.com/joeky888/fil
It is a command tool written in Go.
Similar to file
command but cross-platform without any dependency.
Usage:
file <SOME_FILE>
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).