Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
want the magic number (Hex Signature)above extension

.ACCDT
.ABR
.BAK
.CFM
.CSS
.CSV
.DOTM
.DXF
.JS
.MPT
.PPSX
.PXC
.XSL
.XSLT i want the magic number above extension
Posted
Updated 6-Apr-14 23:53pm
v3

What on earth makes you assume that you can look at data and automatically identify it from the first couple of bytes as being a particular file type: there is no "hex signature" that will uniquely identify a file type - that's why we have the extension. If we had a hex signature, we wouldn't need the extension...

For example: .BAK is used for a heck of a lot of systems as a copy of the original data, so it could contain any type of file in theory. .CSV will look a lot like a "normal" text file, until you try to parse it and find it's a bit, well, rubbish as CSV data.

Use the extension: that's what it's there for!
 
Share this answer
 
The generous people here at Code Project are willing to help you solve your code problems provided you at the very least attempt to solve the problem on your own.

Look them up yourself, a simple Google search found these websites.
File SIgnatures[^]
Magic numbers[^]

There is a very helpful article on searching for answers: How to Use Google and Other Tips for Finding Programming Help[^]

At the very least read this: Code Project Quick Answers FAQ[^]

Sorry if I sound sharp but if you really want learn, you need to learn how to find answers on your own. Simply demanding asnwers will only upset the people who can help you and you will not find the answers you seek.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900