Could be done in a number of ways. Here's maybe a starting point (assuming you need the saveas done while xref'ing drawings). It also assumes you're using 2005 or higher.
Code:
(defun saveXRef (fn name / dbx fn_base fn_dir fn_ext newFilename)
(cond
((setq dbx (vlax-create-object "ObjectDBX.AxDbDocument.16"))
(cond
((not
(vl-catch-all-error-p
(vl-catch-all-apply 'vlax-invoke-method (list dbx 'Open fn))
)
)
(setq fn_base (vl-filename-base fn)
;; change directory here if need be
fn_dir (vl-filename-directory fn)
fn_ext (vl-filename-extension fn)
newFilename (strcat fn_dir "\\" fn_base "RL" fn_ext)
)
(and (not
(vl-catch-all-error-p
(vl-catch-all-apply 'vlax-invoke-method
(list dbx 'SaveAs newFilename)
)
)
)
(princ (strcat "\nXref " name " saved as " newFilename))
)
)
)
(vlax-release-object dbx)
)
)
)
(defun xAttachSaveAs (/ ent entl lastent path)
(setq lastent (entlast))
(and (vl-cmdf "XATTACH")
(while (> (getvar "CMDACTIVE") 0) (vl-cmdf pause))
(not (eq lastent (setq ent (entlast))))
(= (cdr (assoc 0 (setq entl (entget ent)))) "INSERT")
(setq path (findfile (cdr (assoc 1
(tblsearch "BLOCK" (setq name (cdr (assoc 2 entl)))))))
)
(saveXRef path name)
)
)
(defun C:XSave ()
(xAttachSaveAs)
(princ)
)