the autolisp function GETFILED will return a file name from within a dialog box ex.
(setq filename (getfiled "This Dialog Box" "This.fil" "fil" 8))
"This Dialog Box" is the dialog title, "This.fil" is the default file name to place in the edit box, "fil" is the extension to filter for, and 8 means to select name and it must exist. Check the online help for more on GETFILED.
To erase a specific area, simply assign two points defining upper right and lower left corners of a box to variables perhaps p1 and p2, then select everything in the area, then erase the selection set ex.
(setq selectionset(ssget "C" p1 p2))
Now you may either erase them one at a time or at once ex.
(command "_.erase" selectionset )
or
(setq ndx 0)
(repeat (sslength selectionset)
(entdel (ssname selectionset ndx))
(setq ndx (1+ ndx))
)
If you need to select objects in an irregular area set a list of points defining the perimeter of the area ex
(while (setq pt (getpoint))
(if (not pointlist)
(setq pointlist (list pt))
(setq pointlist (append pointlist (list pt)))
)
)
(setq selectionset (ssget "CP" pointlist))
To select only the entities completely contained within the selected area boundary, replace the C with W and the CP with WP in the ssget calls
Now you can create a small simple program:
(defun C:myprogram ( / pt pointlist ndx selectionset)
(while (setq pt (getpoint "\nSelect defining point: "

)
(if (not pointlist)
(setq pointlist (list pt))
(setq pointlist (append pointlist (list pt)))
)
)
(setq selectionset (ssget "CP" pointlist))
(setq ndx 0)
(repeat (sslength selectionset)
(entdel (ssname selectionset ndx))
(setq ndx (1+ ndx))
)
)
Basically the above program is the same as if you typed erase at the keyboard then selected Crossing Polygon (CP).
Good luck