Protecting Files From DeletionΒΆ

DOS supports a flag to prevent deleting a file with the SCRATCH command but does not provide a mechanism to set it.

A file in a disk image can be protected using the lock command:

(cbm) lock 0:IMPORTANT
Locking ImagePath(0:b'IMPORTANT')

Similarly the protection can be cleared with the unlock command:

(cbm) unlock 0:IMPORTANT
Unlocking ImagePath(0:b'IMPORTANT')

Warning

Locking a file does not prevent it from being deleted by cbmshell.