ZipToInf 1.12 ============= J.G.Harston - jgh@mdfs.net 70 Camm Street, Walkley, Sheffield, S6 3TR ZipToInf will extract Acorn metadata from ZIP files and output it to INF metadata files. Syntax: ZipToInf zipfile -d outdir -X -q comand zipfile - zipfile to extract metadata from -d outdir - output path, defaults to current directory -X - extract all metadata, not just load/exec/length -quit command - command to execute on termination ZipToInf will only output the metadata that is present in the ZIP file. If only load and exec address are present, a short INF file will be created, if time&date stamps are present and the -X option is given, a long INF file will be created. On exit OSBYTE 1 or the DOS ERRORLEVEL is set to any error number. This will be 0 for no error. .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' or equivalent 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. On 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 'L' to represent '19' for Locked on DFS.