AFSFiler 1.32 ============= http://mdfs.net/Apps/Networking/DiskTools J.G.Harston - 70 Camm Street, Walkley, Sheffield S6 3TR AFSFiler is a simple program for accessing Acorn "AFS0" file server disks and disk images to examine and extract files. It will run on BBC, Master, RISC OS and Windows. It will access physical floppies, hard disks and disk images on BBC, Master and RISC OS, and disk images on Windows. On running, you get a 0> prompt. You specify the drive to access by entering the drive number, or specify a disk image to access with the MOUNT command, which changes the prompt to display the image file name. When the disk is first accessed it is examined to find what filesystem is on it. This may take 30 seconds or so with physical disks. At the prompt you can enter commands to examine the disk, examine files on the disk, and transfer files from the disk. To get a list of commands, enter ? or HELP. Command Summary =============== *command -------- This passes the command to the OS. d - Entering a single digit 0-7 will select the specified drive to access and sets the current directory to '$'. The drive number follows the DFS and ADFS numbering convetion. If a hard drive is present then drives 0-3 will select the specified hard drive to look for a Level 3 partition. If no hard drive is present or no partition is found, then a partition is looked on the specified floppy drive. Drive 4-7 will always select the specified floppy drive. MOUNT | -------------------- If a single character this selects the specified drive. Otherwise, it selects the specified file as a disk image file. All disk access is then sent to this file instead of a physical disk drive. The current directory is set to '$'. MOUNT with no parameter re-mounts the current disk. CAT, EX ------- This displays a catalog of the current AFS0 directory. EX displays directory info on each file in the current directory. The header shows what type of fileserver disk is being cataloged, the disk title and current path. INFO () ------------- This displays the file information on the specified file. If no filename is given, it displays information on the disk and filesystem, showing the type of fileserver disk and if the disk image is sequential or interleaved. DIR |& --------------------- This selects a new curent directory. Only directories in the current directory can be selected, or '$' to return to the root. If the disk has been created by a FileStore that supports '*DIR ^' then you can use '^' to select the parent directory. You can also select a directory by specifying its SIN (System Internal Name) directly prefixed with '&', eg DIR &46F. This can be useful for navigating through a broken directory structure. TYPE [CTRLS], DUMP [7BIT] --------------------------------------- TYPE displays a file, and DUMP gives a hexadecimal file dump. If the [CTRLS] option is given to TYPE, then all control characters are passed unfiltered, otherwise only LF and CR are displayed. If the [7BIT] option is given to DUMP, then the characters in the dump are displayed in 7-bit format, with bit 7 ignored. COPY (C) ------------------------ This allows you to copy single or multiple files from the AFS0 disk. If the source is a file, only that one file is copied to the specified destination file. If the source is a directory, then everything in that directory is copied recursively to the destination directory. Using a C option will prompt for confirmation before copying each file, where you can answer Yes or No, or All to copy all files from that point onwards. The destination can be prefixed with 'INF:' to create '.INF' files containing each file's metadata. If copying to a network file server, the object's server metadata (the modification date, etc.) is set if logged on with appropriate ownership and privileges. For example, COPY README README would copy the file 'README' from the AFS disk to the currently selected filing system. COPY $ INF:AFSDISK would copy the entire disk into a directory called 'AFSDISK', creating '.INF' files for each file. Characters in file names invalid on DOS filing systems are translated when copying to DOS files according to the following standard table: AFS0 character / ? < > + = ; \ DOS character . # $ ^ & @ % ~ INF FULL|SHORT -------------- The INF command lets you specify whether to output full '.INF' files containing all the AFS0 metadata, or short '.INF' files containing just the load and execution addresses and the file length. INF on its own displays the current setting, which defaults to FULL. BLOCK ---------------- This dumps out the specified logical disk block. HELP ---- This will list all the commands you can use. QUIT ---- This will terminate the program. Notes ===== If the root directory is on track 0 it is not possible to detect if the disk has interleaved or sequential tracks, so it defaults to sequential. If a file is copied that extends past the end of a truncated disk image, the output file will obviously have the incorrect contents, but it may also have the incorrect length. .INF file format ================ The '.INF' metadata file is a method of storing Acorn/BBC metadata on filing systems that otherwise cannot store it. It is a text file with the same name as the data file, with a '.inf' filename extension. It contains several space-seperated fields with the real filename followed by the file's metadata in upper case hexadecimal in the following order: filename load exec length access modification_date modification_time creation_date creation_time user_account auxilary_account It can be seen that 'load' to 'modification_date' are the standard contents of the OSFILE control block. The additional fields follow on logically. The date and time files are in filing system format. Any fields can be progressively dropped from the righthand end of the string, and a short '.INF' string just contains the first four fields: filename load exec length When output the filename is left padded within 11 spaces, there is exactly one space between the data fields, and the data fields are the full number of digits - 8 digits for the addresses, 2 digits for the access byte, 4 digits for dates, 6 digits for times. When reading, extra spaces and extra fields must be ignored silently. If a field is omitted, the application must ignore it. For example, if there is no access byte, then the access on the extracted file must be left as whatever the filing system sets it to. If the creation date is omitted, then the modification date on the extracted file must be left to whatever the filing system sets it to. However, if the exec address is omitted, it is sensible to set it to the same as the load address. All the following are valid INF files: filename FFFF1900 filename FFFF1900 FFFF8023 filename FFFF1900 FFFF8023 00001273 filename FFFF1900 FFFF8023 00001273 33 filename FFFF1900 FFFF8023 00001273 33 7B23 filename FFFF1900 FFFF8023 00001273 33 7B23 123106 filename FFFF1900 FFFF8023 00001273 33 7B23 123106 7B20 filename FFFF1900 FFFF8023 00001273 33 7B23 123106 7B20 112708 filename FFFF1900 FFFF8023 00001273 33 7B23 123106 7B20 112708 0100 filename FFFF1900 FFFF8023 00001273 33 7B23 123106 7B20 112708 0100 0040 On reading, extra spaces and ommitted leading zeros must be ignored. The following are valid INF files: filename 04000 4010 12B filename 4000 00004010 012B filename 00004000 00004010 0000012B As a special case, the access byte may be a string starting with 'L' to represent '19' for Locked on DFS. Version History =============== 28-Apr-2021 v1.32 Better INT/SEQ detection, DIR ^ allowed, errors flush caches. 28-Apr-2020 v1.31b Fix for full allocation sector with no link. 27-Apr-2020 v1.31a Uses deeper REPEAT/UNTIL loop in file copying. 31-Mar-2020 v1.31 COPY sets top dir metadata, files with multiple allocation maps work, COPY $ works inside a subdirectory, probe for FSOp before writing long info. 04-Apr-2019 v1.30 Brought all Filers to same version number. 08-Jun-2018 v0.18 Reads file lengths, buffers allocation map. 30-May-2018 v0.17 (C)onfirm option, checks if outside image. 27-May-2018 v0.16 JesMap checked when reading files, errors not displayed when mounting. 05-Aug-2012 v0.15 Works with L3FS disks. 19-Nov-2010 v0.14 Initial version, based on SJFiler.