July 5, 2026

Digital preservation is rarely a straight line. It is a battle against time, deprecation, and changing hardware ecosystems. Recently, I found myself facing the ultimate archivist’s dilemma: a massive, invaluable 550MB catalog database representing 1,389 optical discs and nearly 17 Terabytes of data, completely locked inside a proprietary, obsolete 32-bit Mac application from the turn of the millennium: Portents DiskTracker (Version 2.4.7).
DiskTracker was a masterpiece of late-90s software engineering, written in highly optimized C++ using Apple’s legacy Carbon API. It compressed millions of file rows into tiny footprints, running effortlessly on machines with just 32 Megabytes of RAM. But when Apple dropped 32-bit application support, DiskTracker was permanently orphaned. The developer moved on, the automated shareware registration engines vanished, and my 17TB roadmap became an inaccessible time capsule.
This is the story of how I leveraged modern virtualization, cross-platform network bridges, native AppleScript automation, and custom Bash data surgical parsing to liberate those 4 million rows of history into a future-proof, open-format database.
To run a 32-bit Carbon application on a modern host machine, you must construct an authentic graphical sandbox environment from the past. For this deployment, the workload was explicitly divided between a legacy virtual guest layer and a physical, modern operating system:
Before a single byte of data was extracted, we had to make a highly deliberate modification to DiskTracker’s engine configuration. Out of the box, legacy database apps use default formatting markers that completely break modern code parsers.
We navigated to DiskTracker > Preferences > General and explicitly overrode the factory baselines with these strict structural parameters:
Why this choice is non-negotiable: Standard default file renaming or path tracking often contains literal commas, for example (Movie, The (2003).mp4 or Band, The - Album.mp3). If you export using standard comma boundaries, a modern spreadsheet or database will get confused, shattering a single file name across multiple incorrect columns. Forcing Tabs (\t) keeps the data columns perfectly rigid and isolated.
Once the master DiskTracker .dtc binary database opened inside High Sierra, searching through the 1,389 discs was extremely fast, not as instantaneous as Apple’s spotlight but very fast. However, when attempting to use the application’s global text export feature, we hit a hard 32-bit architectural limit: The 4GB Segmentation Fault (EXC_BAD_ACCESS / SIGSEGV). Because 32-bit pointers cannot map more than 4GB of RAM total, translating a compressed 550MB file tree into millions of raw, uncompressed text characters instantly overflowed the system memory allocation tables, crashing the application.
The solution was to switch to a localized “Visible Items Only” export, unrolling individual disc trees and saving them one by one. But executing this manually for 1,389 discs is a nightmare. Furthermore, I was controlling this Mac Mini server headlessly from a Windows 11 PC via a NoMachine VNC network link. This layer stripped away Apple’s physical Command key modifier, causing standard key macros to fail over the network.
To bypass this roadblock, we opened Script Editor Version 2.10 (194) bundled natively inside macOS High Sierra. We wrote a targeted User Interface macro and compiled it safely as a standard script file (.scpt) so it could be executed cleanly inside the editor window without triggering headless security blocks.
The first working script automated everything after a disc was already recursively disclosed. By manually executing a single Recursive Disclosure (Ctrl + Click) on a target disc’s root in List View, the interface unrolls every single underlying subfolder down to the deepest file string. The AppleScript would then take over: opening the Export dialog, switching to “Visible Items,” clearing the filename field, and pausing with the cursor blinking after "Disc " — waiting for manual entry of the disc number and hit Save.
This assembly line was elegant, but it still required a manual step in the loop for every single one of the 1,389 discs: manually disclosing the tree, running the script, typing the number, and then manually collapsing the entry again before moving to the next disc.
The obvious next question was whether the remaining manual steps — selecting the correct disc, recursively expanding it, and collapsing it afterward — could be automated too. Two dead ends came first, and they’re worth documenting because they ruled out the “obvious” approaches:
System Events revealed that its list view isn’t built from standard Mac outline/table UI elements. There was no outline, row, or scroll area object to reference — the list is apparently custom-drawn, invisible to the accessibility layer that UI scripting normally leans on. This ruled out addressing rows programmatically by object reference, and made pixel-coordinate clicking look like the only fallback — a fragile approach given a VM controlled headlessly over VNC, where a single shifted window or scroll position could silently misdirect every subsequent click.The actual answer came from DiskTracker’s own user manual PDF, hosted by the original developer, which documented exactly the keyboard shortcuts needed:
Because the disc list is always sorted by a fixed, sequential Serial number (1 through 1,389, no gaps), this meant every remaining manual step could be reduced to pure keystrokes: jump to the top of the list, arrow down N−1 times to reach disc N, expand recursively, export, collapse recursively, then move to the next row. No accessibility objects, no pixel coordinates — just keystrokes System Events could already send reliably.
-- ==============================================================================
-- SCRIPT NAME: batch_export_discs_v2.applescript
-- ==============================================================================
-- BEFORE RUNNING: DiskTracker's Export As TEXT dialog remembers the last
-- folder you saved to. Do ONE manual, expendable export first (any
-- throwaway filename is fine) into the folder you want this batch to save
-- into. That "seeds" the save location so every export the script performs
-- lands in the right place automatically -- the script itself never sets
-- or checks the folder path.
-- ==============================================================================
-- LOGIC (based on DiskTracker's documented keyboard shortcuts):
-- 1. Select the first row in the list (top of "All Disks")
-- 2. For each disc, in order:
-- a. Recursively expand the currently selected disc
-- (Option+Command+Right Arrow)
-- b. Export As TEXT -> Visible Items -> type "Disc N" -> Save
-- c. Recursively collapse it back down
-- (Option+Command+Left Arrow)
-- d. Move selection down to the next row (Down Arrow)
--
-- Because selection always moves exactly one row at a time from a known
-- starting point, and the list order is fixed (Serial 1, 2, 3...), the
-- Nth iteration of the loop always lands on Serial N -- no coordinates,
-- no accessibility object references, just keystrokes.
-- ==============================================================================
set START_DISC to 1
set END_DISC to 44 -- adjust range per run
tell application "DiskTracker" to activate
tell application "System Events"
tell process "DiskTracker"
-- --- MOVE TO THE TOP OF THE LIST ---
key code 126 using {command down} -- Command+Up Arrow: jump to top
delay 0.3
-- If starting disc isn't 1, move down (START_DISC - 1) times first
if START_DISC > 1 then
repeat (START_DISC - 1) times
key code 125 -- Down Arrow
delay 0.05
end repeat
end if
repeat with discNum from START_DISC to END_DISC
-- --- STEP 1: RECURSIVE DISCLOSURE (documented shortcut) ---
key code 124 using {option down, command down} -- Right Arrow
delay 0.5 -- allow time for a potentially large tree to unroll
-- --- STEP 2: OPEN THE EXPORT DIALOG ---
click menu bar item "File" of menu bar 1
delay 0.4
click menu item "Export As TEXT…" of menu "File" of menu bar 1
delay 0.6
-- --- STEP 3: SWITCH TO "VISIBLE ITEMS" ---
key code 125 -- Down Arrow (moves focus to Visible Items option)
delay 0.4
-- --- STEP 4: TYPE THE FILENAME AUTOMATICALLY ---
-- Give the Save dialog extra time to fully render and settle
-- focus before we touch it. This is the step most sensitive to
-- timing, so this delay is intentionally generous.
delay 0.8
-- Force the filename field to be completely cleared, regardless
-- of what currently has focus or what text is already there.
-- Command+A selects all text in whatever field has focus, then
-- Delete removes it. This is far more robust than Shift+Tab,
-- which depends on focus already being in exactly the right
-- place at exactly the right time.
keystroke "a" using {command down}
delay 0.2
key code 51 -- Delete/Backspace, clears the selected text
delay 0.2
keystroke "Disc " & discNum
delay 0.3
-- --- SAFETY CHECK: bail out if a "replace file" prompt appears ---
if exists sheet 1 of window 1 then
log "WARNING: unexpected dialog before Save on Disc " & discNum & " -- stopping for manual review."
display dialog "Unexpected dialog appeared before Save on Disc " & discNum & ". Please check DiskTracker manually." buttons {"OK"} default button "OK"
error "Stopped due to unexpected dialog on Disc " & discNum
end if
-- --- STEP 5: SAVE ---
keystroke return
delay 1.0 -- allow time for export to finish writing to disk;
-- increase this for discs with very large item counts
-- --- SAFETY CHECK: confirm the Save dialog actually closed ---
if exists sheet 1 of window 1 then
log "WARNING: Save did not complete cleanly for Disc " & discNum & " -- a dialog is still open."
display dialog "Save did not complete for Disc " & discNum & ". A dialog is still open -- please check DiskTracker manually before continuing." buttons {"OK"} default button "OK"
error "Stopped due to incomplete Save on Disc " & discNum
end if
-- --- STEP 6: RECURSIVE COLLAPSE (documented shortcut) ---
key code 123 using {option down, command down} -- Left Arrow
delay 0.4
-- --- STEP 7: MOVE TO THE NEXT DISC ---
key code 125 -- Down Arrow
delay 0.3
log "Finished Disc " & discNum
end repeat
end tell
end tell
log "Batch export complete: Disc " & START_DISC & " through Disc " & END_DISC
display dialog "Batch export complete: Disc " & START_DISC & " through Disc " & END_DISC buttons {"OK"} default button "OK"
The first version of this script used Shift+Tab to jump backward into the filename field, relying on that action to also select the existing text so the next keystroke would overwrite it cleanly. In practice, this occasionally raced against the Save dialog still rendering: if focus hadn’t fully settled, the new filename would get typed into the wrong place (or not replace the old text at all), silently reusing the previous disc’s filename. That triggered an unhandled “replace existing file?” prompt, which the script had no logic to detect — so it appeared to keep running, but was actually stalled, having lost its place entirely. This surfaced as a genuine, reproducible gap in the output sequence (one disc silently skipped).
The fix was twofold: replace the fragile Shift+Tab approach with an explicit Command+A (select all) then Delete, which clears the field regardless of what currently has focus or what text was already there; and add explicit checks for an unexpected dialog (sheet 1 of window 1) both before and after the Save step, so the script stops cleanly and alerts rather than silently drifting out of sync if something unexpected appears.
This assembly line is elegant. The script fires, sets the window to “Visible Items,” clears the filename field reliably, types the disc’s name and number automatically, and watches for its own dialog to close before moving on. As the operator, all that’s required now is to watch it run — no typing, no manual expand/collapse — and the file streams smoothly across our SMB network link straight onto a massive, high-capacity external 16TB storage array.
The “Visible Items” engine has a major behavioral quirk. When it runs, it extracts the deep file tree of your expanded target disc, but it also captures a flat, closed summary row for every other closed disc sitting in the active database list. This leaves each individual file padded with thousands of lines of redundant data at the top and bottom.
To prune away this padding, we moved the files out of the virtual box and executed a custom Bash shell script natively on macOS Sequoia. Running this script on the modern host OS rather than inside the High Sierra VM ensures the data streams directly over our physical high-capacity storage bus line at full hardware speeds, processing millions of lines of text in under a second.
The script reads the filename as a numerical “hint” (e.g., Disc 2 ➔ ID 2), clones the master 18-column header row to Line 1 of a new file, and utilizes awk/Perl to parse the Tab-Delimited layout. It employs a specialized text substitution algorithm to safely bypass thousand-separator formatting commas (like matching the string 1,389 when you cross disc 1,000) inside the Serial column, surgically preserving only the true data payload:
#!/bin/zsh
# ==============================================================================
# SCRIPT NAME: trim_padding.sh
# ==============================================================================
# LOGIC:
# 1. Loop over every "Disc X" file in the current folder.
# 2. Skip any file that's already an output from a previous run.
# 3. Get the disc number from the filename, and build the comma-formatted
# version of it (e.g. 1000 -> 1,000), since that's how big numbers
# appear inside the file itself.
# 4. Keep line 1 (the header) no matter what.
# 5. Keep every other line ONLY if it starts with "<number>\t" -- i.e. the
# disc number, followed immediately by a tab, at the very start of the
# line. Everything else on the line is irrelevant to this decision.
# 6. Write the kept lines out to a new "_trimmed" file, one per disc.
# ==============================================================================
for file in Disc\ *; do
# --- PROTECTION GATE ---
# If this filename already contains "_trimmed", it's an output file from
# a previous run, not a raw input file -- skip it so we never process our
# own output.
if [[ "$file" == *"_trimmed"* ]]; then
continue
fi
# --- EXTRACT THE DISC NUMBER FROM THE FILENAME ---
# "${file#Disc }" strips the literal prefix "Disc " off the start of the
# filename. Since filenames are always "Disc X" with no extension,
# whatever remains IS the disc number, e.g. "Disc 22" -> "22".
target_string="${file#Disc }"
# Safety check: if for some reason nothing was left (empty string),
# skip this file rather than risk processing with a blank target.
[[ -z "$target_string" ]] && continue
# --- BUILD THE COMMA-FORMATTED VERSION OF THE NUMBER ---
# Large numbers appear inside the file WITH a thousands separator comma
# (e.g. 1000 is written as "1,000"). This line converts our plain number
# into that same comma format so we can match it correctly later.
# How it works, step by step:
# 1. rev -> reverse the digits (e.g. "1000" -> "0001")
# 2. sed 's/\(...\)/\1,/g' -> insert a comma after every 3 characters
# 3. rev -> reverse back to normal digit order
# 4. sed 's/^,//' -> remove a leading comma if one got added
# For numbers under 1000 (like all of Disc 1-44), this leaves the number
# completely unchanged, since there's nothing to insert a comma into.
formatted_target=$(echo "$target_string" | rev | sed 's/\(...\)/\1,/g' | rev | sed 's/^,//')
# --- NAME THE OUTPUT FILE ---
# e.g. "Disc 22" -> "Disc_22_trimmed.txt"
output_file="Disc_${target_string}_trimmed.txt"
# Just a progress message printed to the terminal so you can see it
# working disc by disc. Does not affect the file contents.
echo "Processing '$file' -> keeping rows whose column 1 matches '$formatted_target'..."
# --- THE ACTUAL FILTERING STEP ---
# LC_ALL=C tr '\r' '\n' < "$file"
# Converts old-style carriage-return-only line breaks into proper
# newline characters, so each row is treated as its own separate line.
# LC_ALL=C forces byte-safe processing, which is essential here since
# these legacy exports contain Mac-Roman-encoded special characters
# (e.g. Adobe® Photoshop®) that a UTF-8 locale can choke on, silently
# truncating the file mid-stream without this flag.
#
# | TARGET="$formatted_target" perl -ne '...'
# Pipes that cleaned-up text into Perl, one line at a time (-n),
# running the given code (-e) on each line.
# TARGET="$formatted_target" makes our disc number available inside
# Perl as an environment variable, so Perl's regex can use it.
#
# Inside the Perl code:
# $. -> the current line number Perl is looking at
# $. == 1 -> true only for line 1, the header -- always kept
# \Q...\E -> treat the number in between as literal text, not
# special regex characters (safety precaution)
# ^...\t -> the line must START WITH the target number,
# immediately followed by a tab character
# print if X || Y
# -> print (keep) the line if EITHER condition is true:
# it's the header, OR its start matches our target
LC_ALL=C tr '\r' '\n' < "$file" | LC_ALL=C TARGET="$formatted_target" perl -ne '
print if $. == 1 || /^\Q$ENV{TARGET}\E\t/;
' > "$output_file"
done
# Printed once, after every file in the loop has been processed.
echo "Success! All files have been safely processed and trimmed."
Automating the trim across 1,389 discs is only trustworthy if every kept line is verifiably correct — no row silently dropped, no row silently duplicated. Rather than trust the script by eye, we cross-checked its output against an independent count, run entirely outside the pipeline itself.
First, we counted how many rows should exist for a given disc by re-scanning the raw source file directly, completely independent of the script:
LC_ALL=C tr '\r' '\n' < "Disc 11" | LC_ALL=C grep -n $'^11\t' > /tmp/expected_11.txt
wc -l /tmp/expected_11.txt
wc -l Disc_11_trimmed.txt
700 /tmp/expected_11.txt
701 Disc_11_trimmed.txt
The one-line gap is exactly accounted for by the header row, which the trimmed output includes but the raw grep count does not: 700 (matching data rows) + 1 (header) = 701. Counts matching is a strong first signal, but it only proves the quantity is right — not that the content is identical.
For full certainty, we went a step further and diffed the two data sets line by line, byte for byte:
LC_ALL=C tr '\r' '\n' < "Disc 11" | LC_ALL=C grep $'^11\t' > /tmp/expected_only.txt
tail -n +2 Disc_11_trimmed.txt > /tmp/actual_only.txt
diff /tmp/expected_only.txt /tmp/actual_only.txt
The diff returned no output at all — meaning the two files are byte-for-byte identical, row for row. Combined with the matching line counts, this confirms the pipeline operates with full data integrity: every row that should have been kept was kept, exactly as it appeared in the source, and nothing extraneous slipped through.
One critical detail made this verification possible in the first place: LC_ALL=C had to be applied to every tr invocation, including the diagnostic commands themselves. Without it, tr silently truncates on the first Mac-Roman byte sequence it can’t interpret under a UTF-8 locale — producing a falsely small file that looks like data loss in the pipeline, when the truncation was actually happening in the verification step. Once every tr call in both the production script and the verification commands was locked to byte-safe processing, the numbers converged exactly, and the diff confirmed it beyond doubt.
Running a broader sequential-gap check across the full flat export (every disc’s Serial number extracted and checked for continuity from 1 to 1,389) surfaced something unexpected: a small number of discs — including Serial 367 (“aridi,” a clip-art CD) and Serial 693 — produced non-numeric “phantom” entries when sorted, rather than clean gaps.
The cause turned out to be entirely benign: DiskTracker’s free-text Item Note field allows literal line breaks, and at some point in the archive’s history, multi-line notes had been typed into a handful of discs (e.g., listing several clip-art volume names, one per line, or software licensing details). When exported to a strictly tab-delimited text format, those embedded line breaks are preserved faithfully — which means a single logical database row can span multiple physical lines in the exported file. Every line-based tool in this pipeline (the VS Code regex checks, the awk/Perl trimming script) assumes one row equals one line, so on these specific discs, the continuation lines don’t start with a Serial number and silently fail to match — meaning the file listing for that disc remains fully complete and correct, but the tail end of that one hand-typed Item Note gets truncated in the trimmed output.
A small standalone diagnostic script was used to flag every line in the flat export that doesn’t begin with a Serial number followed by a tab (and isn’t the header) — surfacing exactly which discs are affected, so each can be reviewed individually if the note content matters. In this case, the Item Note field was judged non-critical relative to the actual file listings, so the trimming pipeline was left unchanged; the flagged discs are simply noted for awareness rather than requiring a pipeline fix.
By executing this pipeline, a 23-year-old filing system — the directory tree, filenames, sizes, and folder hierarchy for roughly 4 million files spread across 1,389 optical discs — has been successfully reborn. It’s worth being precise about what this project did and didn’t do: the physical discs and their actual file contents remain exactly where they were, untouched. What’s been rescued is the map, not the territory — the complete inventory of what exists on those 1,389 discs, freed from a single point of failure: one 23-year-old, orphaned, 32-bit database file that only one aging application could ever read.
That distinction matters enormously for preservation. Before this project, knowing what was on any given disc meant hunting down a working copy of DiskTracker, running it inside an increasingly hard-to-reproduce virtual environment, and hoping the .dtc file never became corrupted, since it was the only record of this catalog in existence. Now, the entire inventory sits as a series of clean, universal, pristine Tab-Delimited text grids — no proprietary binary format, no dependency on a single unmaintained application. These can be opened instantly in VS Code, sorted natively across desktop spreadsheets, ingested into modern asset managers like NeoFinder, or scaled into a massive local SQL database.
The actual digitization of the 1,389 discs themselves — transferring their real file contents onto modern storage — remains a separate, much larger undertaking. But that project can now proceed disc by disc with a reliable, searchable map already in hand, rather than starting blind.
This project is a powerful testament to the modern tech stack. By stringing together diverse, niche, and highly subtle methodologies, we successfully built a bridge across decades of computing history—ensuring that a lifetime of cataloguing work will survive perfectly for generations to come, independent of the software that first created it.