@verb #13:"_rename_file" this none this rxdo #55 @program #13:"_rename_file" this none this "Rename a file. Called by @rename." set_task_perms(caller_perms()) {object, fname, iobjstr} = args if (iobjstr[1] == "!") iobjstr = iobjstr[2..$] elseif (to = $code_utils:parse_fileref(iobjstr)) if (object == player:my_match_object(to[1])) "The specified target object was the source." iobjstr = to[2] else "This is really a @move, not a @rename" return this:_move_file(@args) endif endif e = `object:filerename(fname, iobjstr) ! ANY' if (e == E_INVIND) player:tell("Renaming ", object, "!", fname, " --> File not found") elseif (e == E_INVARG) player:tell("Renaming ", object, "!", fname, " --> File already exists with that name") elseif (typeof(e) == $ERR) player:tell("Renaming ", object, "!", fname, " --> ", e) else player:tell(object, "!", fname, " renamed to !", iobjstr) endif "Last modified by Dax (#789) on Tue May 3 13:45:55 2005 MDT." .