Commodore 1551 User Manual page 35

Table of Contents

Advertisement

Files with a SHIFf-SPACE in their name can also be troublesome, because the disk
interprets the shifted SPACE as signalling the end of the file name, and prints whatever
follows after the quotation mark that marks the end of a name in the directory. This
technique can also be useful, allowing you to have a long file name, but also make the
disk recognize a small part of it as being the same as the whole thing without using
pattern-matching characters.
In any case, if you have a troublesome filename, you can use the Chr$() function to
specify troublesome characters without typing them directly. This may allow you to build
them into a RENAME command. If this fails, you may also use the pattern-matching
characters discussed for a SCRATCH command. This gives you a way to specify the
name without using the troublesome characters at all, but also means loss of your file.
For example, if you have managed to create a file named" "MOVIES", with an
extra quotation mark at the front of the file name, you can rename it to "MOVIES" by
using the Chr$O equivalent of a quotation mark in the RENAME command:
Example:
RENAME(CHR$(34)+ "MOVIES") TO "MOVIES"
Alternate example:
PRINT# 15, "RO:MOVIES
= "
+ CHR$(34)+ "MOVIES"
The CHR$(34) forces a quotation mark into the command string without upsetting
BASIC. The procedure for a file name that includes a SHIFf-SPACE is similar, but uses
CHR$(I60).
In cases where even this doesn't work, for example if your diskette contains a comma
file, (one named".") you can get rid of it this way:
Example:
SCRATCH"?"
Alternate example:
PRINT# 15, "SO:?"
Depending on the exact problem. you may have to be very creative in choosing pattern-
matching characters that will affect only the desired file. and Illay have to rename other
files first to keep them from being scratched too.
COLLECT
The COLLECT command recalculates the Block Availability Map (BAM) of the
current diskette, allocating only those sectors still being used by valid, properly-closed
files and programs. All other sectors (blocks) are left unallocated and free for re-use, and
27

Advertisement

Table of Contents
loading

Table of Contents