WeSearch

A Tale of Two File Names

·16 min read · 0 reactions · 0 comments · 20 views
#windows#file-system#legacy-software#reverse-engineering#checksum
TL;DR · WeSearch summary

The article explains the legacy 8.3 filename system in Windows, a holdover from DOS and early Windows that shortens long filenames using tildes and checksums to maintain compatibility. It details how filenames are truncated and transformed, including the use of an undocumented checksum function when naming conflicts occur. The author reverse-engineers the Windows API using debugging tools to uncover how the system generates these short filenames.

Key facts
Original article
Tomgalvin
Read full at Tomgalvin →
Opening excerpt (first ~120 words) tap to expand

Users of DOS or older versions of Windows will have invariably stumbled upon a quirk of Windows’ handling of file names at some point. File names which are longer than 8 characters, have an extension other than 3 character long, or aren’t upper-case and alphanumeric, are (in some situations) truncated to an ugly shorter version which contains a tilde (~) in it somewhere. For example, 5+6 June Report.doc will be turned into 5_6JUN~1.DOC. This is relic of the limitations brought about by older versions of FAT used in DOS and older versions of pre-NT Windows. In case you aren’t aware of how 8.3 file names work, here’s a quick run-down. All periods other than the one separating the filename from the extension are dropped - a.testing.file.bat turns into atestingfile.bat.

Excerpt limited to ~120 words for fair-use compliance. The full article is at Tomgalvin.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Tomgalvin