GN_Ren, Rename file

Register parameters

RST 20H, DEFW $6609
IN:
     HL = 0,1,2; not allowed (B=0)
     BHL = pointer to filename of file to be renamed (HL > 255)

     DE = 0,1,2; not allowed
     DE = pointer to replacement name (no path must be specified).

OUT, if call successful:
     Fc = 0
OUT, if call failed:
     Fc = 1
     A = error code:
          RC_ONF ($12), file not found
          RC_IVF ($17), invalid filename
          RC_EXIS ($19), file with replacement name already exists
          RC_USE ($15), file is in use and cannot be renamed

Registers changed after return:
     ..BCDEHL/IXIY same
     AF....../.... different 

Notes

The replacement name must be just "filename.ext" - it must not include device or directory segments.

Related calls

GN_Cl, close file
GN_Del, delete a file from memory
GN_Opf, open file/resource (wildcard search)
OS_Cl, internal close (OZ usage)
OS_Del, file delete (internal OZ usage)
OS_Frm, file read miscellaneous
OS_Fwm, file write miscellaneous
OS_Gb, get byte from file (or device)
OS_Gbt, get byte from file (or device) with timeout
OS_Mv, move bytes between stream and memory
OS_Op, internal open (OZ usage)
OS_Pb, write byte to file, device
OS_Pbt, write byte to file, device with timeout
OS_Ren, file rename (internal OZ usage)