LastChoice - A Zig Journey to Data Recovery

Why This Exists

My dad was an early adopter. He ran his business and much of his life through PFS: First Choice, an all-in-one DOS suite from the late ’80s, and over the years its little flat-file database accumulated things worth keeping. Then his old computer finally died, and the data was stranded in .FOL files that nothing modern can open. The recovery options I found were either paid services or tools you’d need to already be a programmer to use.

So: a family IT ticket, escalated to engineering.

Enter LastChoice (and Zig)

LastChoice is a command-line tool that reads FirstChoice .FOL databases and exports them to formats that will outlive us all (SQLite, CSV, JSON). I wrote it in Zig, partly because a binary file format parser is a great fit for a systems language, and mostly because I wanted an excuse to learn Zig properly.

It turned out to be a good pairing. Parsing a 1980s block-structured format (128-byte blocks, records that span blocks, a schema you have to reconstruct) is exactly the kind of work where Zig’s explicit memory management keeps you honest. No garbage collector to hide behind; you know where every byte lives, which is rather the point when the bytes are your dad’s records.

What Came of It

  • The data came back. Records that would have been lost are now in a SQLite file my dad’s newer software can actually use. That felt better than shipping most professional projects, if I’m honest.
  • It’s public. Anyone else sitting on .FOL files (and the retro-computing corners of the internet suggest there are more of you than you’d think) can recover their own data for free. Data archeology as a public good.
  • I learned Zig on a real problem instead of a tutorial, which is the only way it sticks for me. (It wasn’t the last time, and the language keeps showing up in my projects.)

Niche? Extremely. But formats die and bytes don’t, and somebody has to keep the ferry running between them.