[Coco] Mass-extraction of DSK images.

Mathieu Bouchard matju at artengine.ca
Tue Jul 11 11:32:18 EDT 2017

I don't know whether you still want that, as Guillaume sent you a Windows shell 
script, but you say you have a Mac. I made a Linux shell script for that, which 
probably works on Mac too. It doesn't use toolshed, it just cuts any file into 
chunks of 161280 bytes. If you give it "FOO.DSK" it will create "FOO/000.DSK", 
"FOO/001.DSK", and so on.

if [ "$1" = "" ]; then echo "error: dsk name missing"; exit 1; fi
DEST=$(basename "${1%.*}")
mkdir "$DEST" || exit 2
last=$[$(stat -c%s "$1")/161280 - 1]
for i in $(seq 0 $last); do
   dd if="$1" of="$DEST/$(printf %03d "$i").dsk" bs=161280 skip="$i" count=1

Le 2017-02-05 à 13:29:00, Allen Huffman a écrit :

> Does anyone know how to mass extract DSK images in to directories? I somehow 
> did it when I first set my CoCo back up using the CoCoSDC. I have folders that 
> are all my OS-9 files and RGB-DOS files in directories. I know I had some way 
> I automated doing through DISK000.DSK to DISK255.DSK to do this.
> I have maybe 500 DSK images from my old floppies that I had extracted in to 
> files, but now I can’t find that so I am trying to do it again. I expect I did 
> something from the command line (Mac) using toolshed tools (decb dsave, 
> perhaps) but I can’t remember how I did it.
> Anyone done this?
> I’ll be sure to document it this time ;-)

| Mathieu BOUCHARD --- tél: 514.623.3801, 514.383.3801 --- Montréal, QC

More information about the Coco mailing list