33h FL$RENM rename a file
Input X = Old file name (leading byte count)
D = New file name (leading byte count)
Output - none -

Changes the name of a file.

Files can only be renamed onto the same device. The old name is deleted and then the new name is saved. On an EPROM device, this means that only eleven more bytes used by the new filename are saved.

Both filenames are leading byte count strings. If the device name is missing from the old file name (at X), the device is assumed to be the currently selected device (see FL$SETP). The device name may be omitted from the new file name (at D).

Note that the new file name may not be a device name only, as in FL$COPY. If the two device names differ, or either file name is illegal the bad file name error is returned.

Example To rename the file A:HAWES to GAYLE :
        ASCIC   "A:HAWES"
        ASCIC   "A:GAYLE"       ; or ASCIC      "GAYLE"

        LDX     #COPY_FROM
        LDD     #COPY_TO
        OS      FL$RENM
        BCS     ERROR


Errors 194 - battery too low
200 - read pack err
234 - file not found
235 - file exists
236 - bad file name
239 - pack full
240 - unknown pack
241 - pack not blank
243 - bad device name
244 - read only pack
245 - write pack err
246 - no pack