I often run a program that asks for the directory and then the name of the drawing and then combine them together.

(princ)
(setq FILE nil)
(setq PREFIX (getvar "dwgprefix"))
(setq DNAME (getvar "dwgname"))
(setq FNAME (strcat PREFIX DNAME ".DAT"))

Is there a way I can drop the .dwg from "dwgname" since I really want to make a .dat file?

Thanks,
Beth