*DELETE rubbish
*DELETE $. !BOOT
If the file you are trying to delete does not exist, a 'Not found' error will be
generated. Sometimes, particularly from within programs, it is convenient to
ensure that a file does not exist, but without causing an error if it has already
been deleted. For this reason the *REMOVE command behaves exactly as
*DELETE but produces no error if the file did not already exist.
Neither *DELETE or *REMOVE will operate successfully on a file which has
been 'Locked' using the 'L' access code. To delete a locked file you must first
remove the lock with *ACCESS, e.g.:
*ACCESS data
*DELETE data
Directories are always locked unless you alter their access codes, and they have
a further restriction on deletions: a directory must be empty of files before it
can be deleted. If you attempt to delete a non-empty directory, you will receive
the error message 'Dir. not empty'.
To delete a group of files, for example all the files in a directory, you can use the
*DESTROY command, which will accept a filename containing wildcards. Any
file which matches the wildcard speefication will be deleted, so you can see the
command's name was not chosen lightly. Before the command massacres your
files it prints *INFO information on all of the affected files and then asks:
Destroy ?
to which you must reply by typing 'YES' at the keyboard for the command to
take effect, otherwise it is aborted.
The ability to rename files is important by virtue of its versatility: renaming
may not only change the name of a file, it may also move the file around in the
hierarchy, because the hierarchy is, after all, based on names. The *RENAME
command is followed by the source pathname and then the destination.
Therefore. the command:
*RENAME this that
will change the name of the file currently called 'this' to 'that'. Furthermore,
this command:
*RENAME test $.programs.test
actually moves the file 'test' from the CSD into '$.programs' and names it 'test'
in that directory. You may also alter the name of the file whilst moving it, like
this:
*RENAME 0ldFile ^.NewFile
F 17