Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Identifying file type in Windows

Linux operating system identifies files by looking at its magic number at the starting of the header. How does windows do it ? Does it also have some kind of magic number mechanism or does it only rely on the file extension ?

like image 500
megson Avatar asked Jan 04 '12 10:01

megson


People also ask

How can you identify the format of a file?

When determining the file format, all you have to do is check the last three letters in the file name. Those last three letters represent a file extension. If the file extension is not clearly visible, just right click on the file, then choose Properties. Now you will be able to see the file extension.

How can I find the file type without an extension?

Make Sure the File Doesn't Have an Extension Alternatively, you could right-click on the file and select Properties. You'll see the Type of file in the General tab of file properties. If it says File, you know that the file has no extension.


1 Answers

It relies only on the extension, as provided by the filesystem; the contents of the file are not examined. See e.g. this article - it talks about Windows XP, but AFAIK the general behavior is shared by all released versions of Windows so far: http://support.microsoft.com/kb/307859

like image 170
Piskvor left the building Avatar answered Oct 14 '22 15:10

Piskvor left the building