Don't be dissing on the DAT
So you just received an email with an attachment that someone sent you, but the extension on the file is .DAT. What exactly is a .DAT file and how to you open .DAT files? These are two questions I’m going to try to answer as I’ve seen many friends and family encounter this problem before.
The first thing to understand about .DAT files is that it indicates a file that has arbitrary data. That means it’s not associated with any one particular program or application. When you see a file with a .XLS extension, you know it’s referring to an Excel file, and so on. But with .DAT files, you have to figure out how to open it yourself and different .DAT files may open with different programs.
Before we get into the different ways you can open a DAT file, it’s worth noting that you should first check to make sure the file does not contain any viruses. Since a DAT file can be anything, I’ve seen cases where spammers and hackers try to hide spyware or viruses inside DAT files.
If you don’t already have an anti-virus program, I recommend using either Kaspersky or Bitdefender since they consistently perform at the top in AV-Test and AV-Comparatives rankings. They are not free, but most free antivirus programs end up bundling extra junk software or redirecting your browser to their “secure” search solution, which isn’t secure at all and just tracks you and shows you more ads.
The best way to open a .DAT file is to use the program that created it. Obviously, that’s easy if you knew which program created it, right? So how does one go about figuring this out? Well, there are a couple of ways. Firstly, you can try opening the file in something like Notepad. You should know that Notepad can open anything, even image and video files and display them as text.
Almost all of the file will most likely be gibberish that makes no sense, but sometimes at the beginning or end of the file, you will see some useful information. This is because even videos, images, etc have some sections of the file that are text and that usually contain information about the file. As an example, I opened the Wildlife sample video in Windows 7 using Notepad.
When opening the file in Notepad, you need to choose All Files otherwise it will only show you text files. Once you do this, select the video file and open it. It might take a while to open it if it’s a big video file. Now look at the top and you’ll see some interesting info:
As you can see, there is some text and even though it doesn’t tell you the exact filetype, you can gather that it’s a video file from Microsoft. My first choices would be WMV (Windows Media Video) or AVI. Now Notepad is a very simple tool and it may not work all the time depending on what kind of file it is.
However, I have written another post on how to determine the filetype of a file that doesn’t have an extension and the same procedure that I describe there can be used to for DAT files. Basically, you have to install a hex editor, which lets you view the hex code for a file and more accurately see the data. You’ll have a much better chance of figuring out the original file type using this method.
You’ll normally only see DAT files when receiving emails with attachments. Most common programs today do not generate .DAT files and only computer programmers use these files on any kind of regular basis.
Another thing you could try would be to ask the person who sent you the email if they know which program was used to create the file. Now if they tell you that they actually sent a picture or a document and they are not sure why it’s a .DAT file, it could be that the file extension was changed in the process of having the email routed to you.
For some strange reason, some email programs automatically change the file extension on email attachments to .DAT. So if the person sent you a picture and now it’s a .DAT file, you first need to save it to your computer and then change the file extension to JPG or GIF or PNG or whatever you think it’s supposed to be. If they sent you a Word document, change it to .doc or .docx, etc.
You can change the file extension on a file by first going to My Computer, clicking on Tools and then Folder Options.
In Windows 7, you have to click on the Organize button and then click on Folder and Search Options.
In Windows 8, click on the View tab and then check the File name extensions box.
Except for Windows 8, you’ll need to click on the View tab next and then scroll down to the option “Hide extensions for known file types” and UNCHECK it. In this way, we’ll now be able to see the file extension and change it to something else.
Now simply right-click on the .DAT file and change the file extension after the dot to the desired file format. You should also see the icon representing the file change to the appropriate program used to open that file type, i.e. Excel in the screenshot below.
If you’re still not able to determine the file type using Notepad or the hex editor, you can go at it with a brute force attack. Basically, right-click on the DAT file, choose Open With and try as many programs as you can find. For testing, I changed one of my Excel files to a .DAT extension, right-clicked on it, choose open with Excel and it worked!
Now Windows was actually smart enough to figure out that the file was an Excel file even though the extension was incorrect because it gave me Excel as the top recommended program.
You should also try programs like VLC for any type of possible video or music file and a photo viewer in case it’s an image, etc. So hopefully you are now able to open your mysterious .DAT file using one of the above-mentioned methods! If not, post a comment and I will try to help! Enjoy!