FSpRename
Str255 newname; the file's new title FSpRename function changes the name of a file or directory. spec is pointer to aa FSSpec record specifying the file to be renamed. newname is the name you want the file to have.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
bdNamErr (-37) Bad file or volume name
dirFulErr (-33) Directory full
dupFNErr (-48) Duplicate filename (new name already exists)
extFSErr (-58) External file system
fLckdErr (-45) File is locked
fnfErr (-43) File not found
fsRnErr (-59) File system rename error
ioErr (-36) I/O error
nsvErr (-35) No such volume
paramErr (-50) Error in user parameter list
vLckdErr (-46) Volume is locked
wPrErr (-44) Diskette is write-protected
version of the PBHRename function.