• Please review our updated Terms and Rules here

Beeb File Utilities — three Windows command-line tools for BBC Micro files and disk images

Kara The Valkyrie

New Member
Joined
Jun 9, 2026
Messages
5
I recently updated the three command-line tools I created for Beeb enthusiasts to view, extract and edit BBC Micro files and disk images on a Windows PC. They can create output as plain text, BBCode, or HTML. With one command you can produce a master "catalog" of all your disk images in minutes.

  • BBCBasicToText — display a tokenized, binary BBC Micro BASIC file as text, HTML, or BBCode.
  • BBCDataFileToText — show BBC PRINT# type data files as text, HTML, or BBCode.
  • BBCReadDiskImage — display *CAT-style output of .SSD, .DSD or .IMG disk images, export files, import files back in, delete files, and dump raw sectors.

I wrote them as console applications, originally for my own use after recapping the power supply in the BBC Model B I bought forty years ago and starting to pull my old disks onto the PC. They are on the Microsoft Store, so they have been scanned, tested and signed.

BBCBasicToText

Displays a tokenized, binary BBC Micro BASIC file as text, HTML, or BBCode for bulletin board posts. If there is "hidden data" after the BASIC program it is displayed in hex, as are control characters. It detects Acorn versus BBC BASIC for Windows/SDL dialect and indents accordingly.

BBCDataFileToText

Shows BBC PRINT#-type data files as text, HTML, or BBCode, with hex and ASCII dump options. Integer, float and string data are coloured differently.

This doubles as a hex dump program for any PC file. I have

Code:
doskey hex=BBCDataFileToText --hex $*

defined in my command terminals for that reason.

BBCReadDiskImage

Displays *CAT-style output of .SSD, .DSD and .IMG disk images, and will export files, import them back in, delete them, and dump raw sectors.

Reading and exporting. Files are named the way they are on the BBC itself, so patterns cover the whole name and a pattern that does not name a directory looks only in $:

  • --export=MYPROG* — names starting MYPROG, in $
  • --export=P.M* — names starting M, in directory P
  • --export=*.* — every file on the disk

Exported files come out as 0_$.MYPROG, carrying the drive and directory, each with a matching .INF file recording its load and execution addresses, length and lock flag. Name a folder as the destination and they are written there.

Importing. --import= writes host files back into an image, creating the image first if it does not exist — name it in full, ending .ssd or .dsd, and you get an empty 80-track image. A file's BBC name, directory and side come from the 0_$.NAME form, or from a matching .INF, so a file exported earlier goes back exactly as it was.

Deleting. --delete= takes the same patterns. Each file is confirmed before it goes unless --force is given, and locked files only go with it. Both importing and deleting compact the disk as they write, so space left by deleted files is reclaimed.

About .IMG files. That extension, which BeebEm and others use, does not say whether a disk is single- or double-sided, so the image itself is asked: its catalogue records how many sectors are on one side, and an image longer than that must hold a second. A 200K image reporting 800 sectors is an 80-track single-sided disk; one reporting 400 sectors is a 40-track disk with two sides. The length alone cannot tell those apart. An image holding no catalogue at all is named and skipped rather than listed as nonsense — a formatted but unwritten disk, or an ADFS or DOS disk from a Master 512, is reported as such.

Common to all three

All three produce colour output, with strings, keywords and the like each coloured differently, or writing plain text (in colour when sent to a command-prompt window), BBCode, or HTML, and can optionally launch your browser for the HTML. They understand wildcards and dive recursively through your folders, so you can convert a whole shoebox of disks in one go.

Long output is made easily viewable with --more, which pauses after each screenful, or --head and --tail for just the start or end. Paging turns itself off when output is redirected or piped, so it is safe to leave in a macro. Four decades on, your Acorn archive has never looked this good!

Running the tools

All three run from a Command Prompt or PowerShell. For example:

Code:
BBCBasicToText    "%OneDrive%\Documents\BBCMicro\ARRAYLENSUM.bbc"
BBCDataFileToText "%OneDrive%\Documents\BBCMicro\NAMES"
BBCReadDiskImage  "%OneDrive%\Documents\BBCMicro\Games.dsd"

In PowerShell, use $env:OneDrive in place of %OneDrive%.

Code:
BBCReadDiskImage "$env:OneDrive\Documents\BBCMicro\Games.dsd"

Optional — DOSKEY shortcuts

Because typing the full command names is tedious, you can create DOSKEY macros in a command file named cmdsetup.cmd:

Code:
doskey brd=BBCReadDiskImage $*
doskey btt=BBCBasicToText $*
doskey bdt=BBCDataFileToText $*

To run this automatically in every new command window, save the following as a .reg file and double-click it. Always be careful adding .reg files unless you trust their source and know what you are doing — it can be a security risk.

Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000009
"AutoRun"="\"%OneDrive%\\<wherever>\\cmdsetup.cmd\""

Download

Beeb File Utilities is free on the Microsoft Store:

Beeb File Utilities on the Microsoft Store

Help

Beeb File Utilities help page

Requires Windows 10 (build 1809) or later, or Windows 11.
 
The latest update of BBCBasicToText now supports tokenizing plain text into Basic which can be added to a Beeb disk image, and also supports a safe “crunch” option to reduce the program size, squeezing the most out of your RAM. Completely free standalone install, no adverts, no AI, nothing copied off your machine. Install it from the Microsoft Store: https://apps.microsoft.com/detail/9PJM5ZVL4C79
 
Back
Top