What is a DAT File?
A DAT file is a generic data file whose internal structure depends on the application that created it. Some DAT files used on Video CDs contain MPEG program streams, but the extension alone does not identify a format.
How DAT Files work
.dat is a naming convention, not a format: unrelated programs reuse it for their own text or binary payloads. The signature database of the file utility alone attaches the extension to RIFF/CDXA video from Video CDs, the Windows boot log BOOTSTAT.DAT, Inno Setup uninstall logs, and Outlook nickname files, and Outlook’s TNEF email attachments usually arrive as winmail.dat. Because the name carries no structural information, file classifies such inputs by content, running signature tests before falling back to text heuristics. The .DAT entries for a Video CD’s MPEG sequences are a special case: they expose raw MPEG tracks through the disc’s file system instead of behaving like ordinary files, while other .DAT files on the same disc hold access or caption data.
Key facts
- No signature is shared across
.datfiles. Thefilemagic database assigns the extension to formats as different as RIFF/CDXA video, the Windows boot logBOOTSTAT.DAT, Inno Setup uninstall logs, and Outlook nickname files, so a pipeline has to route on detected content. When nothing matches,application/octet-stream, which RFC 2046 defines as arbitrary binary data, is the accurate label. - The
.DATentries that stand for a Video CD’s MPEG sequences, listed under/MPEGAV, are not ordinary files. MPlayer’s documentation describes such an entry as an ISO gateway to raw 2324-byte MPEG sectors: Windows emulates raw track reads through it, while the standard Linux ISO 9660 driver returns unusable data. On Linux, read the track itself, for example with MPlayer’svcd://syntax or a ripper such asvcdxrip. Other.DATfiles on the disc, such as/EXT/SCANDATA.DAT(playing-time access data) and/EXT/CAPTnn.DAT(closed captions), are not video, so check the disc path and the content before choosing a media tool. - A Video CD’s MPEG
.DATfile copied through the Windows file system commonly starts with a RIFF header whose form type isCDXA(the bytesRIFFat offset 0 andCDXAat offset 8);filereports it as wrapped MPEG-1 with the media typevideo/x-cdxa. The VCDImager manual says this RIFF container is not part of the disc and is presumably inserted by the operating system or file system, whereas a ripper such asvcdxripextracts the contained MPEG program streams. Renaming the copy to.mpgleaves the RIFF header, sector headers, and padding in place, so a demuxer that expects a bare MPEG program stream may need the wrapper removed first; the same manual documentscdxa2mpegfor stripping it. - Outlook’s TNEF container typically arrives as an email attachment named
winmail.datand can also appear under a generic name such asATT00008.dat; it wraps the sender’s attachments rather than being one of them. Neither name proves the content:filerecognizes TNEF by the little-endian 32-bit signature0x223E9F78at the start of the file (the bytes78 9F 3E 22), so confirm that before unpacking it with a TNEF decoder instead of passing it to a media converter. Per the Library of Congress format description the container packages formatted text, OLE objects, and the regular attachments, and it can embed the sender’s logon name and personal folders path, which a recipient can read by opening the raw file in a binary or text editor.
When DAT Files matter
Identify the producing application or inspect the file signature before selecting a parser or converter. Treating every DAT file alike can cause decoding failures or misinterpret arbitrary binary data.
Sources
- file(1) manual page: filesystem, magic, and language tests
- file magic database, Magdir/riff: RIFF CDXA wrapped MPEG-1 entry
- file magic database, Magdir/windows: Windows formats that use the dat extension
- file magic database, Magdir/mail.news: TNEF signature entry
- MPlayer documentation, section 3.6, VCD playback: VCD structure and .DAT files
- GNU VCDImager manual (Texinfo source): Directory Structure (/MPEGAV and /EXT entries) and the cdxa2mpeg and vcdxrip tools
- vcdxrip(1), GNU VCDImager manual page
- Library of Congress format description fdd000485: Transport Neutral Encapsulation Format (TNEF)
- RFC 2046, section 4.5.1: Octet-Stream Subtype