pro delete_expfac,tel,dtea,dteb
;+
; NAME:
;	DELETE_EXPFAC
;
; PURPOSE:
;	This procedure deletes the exposure factor files between two dates.
;
; CATEGORY:
;	LASCO Exposure Factor
;
; CALLING SEQUENCE:
;	DELETE_EXPFAC,Tel,Dtea,Dteb
;
; INPUTS:
;	Tel:	The telescope: 'c1','c2,'c3','c4'
;	Dtea:	The starting date, can be either a string yymmdd, or
;		the modified julian date, or the CDS time structure
;	Dteb:	The ending date, can be either a string yymmdd, or
;		the modified julian date, or the CDS time structure
;
; SIDE EFFECTS:
;	The files in $NRL_LIB/lasco/expfac/data/YYMM/tel+.... are deleted.
;
; MODIFICATION HISTORY:
; 	Written by:	RA Howard, NRL, 2/1/98
;
;	@(#)delete_expfac.pro	1.2 02/04/98 LASCO IDL LIBRARY
;-
tt = STRLOWCASE(tel)
d0 = YYMMDD2UTC(dtea)
mjd0 = d0.mjd
d1 = YYMMDD2UTC(dteb)
mjd1 = d1.mjd
d=d0
dir = GETENV('NRL_LIB')+'/lasco/expfac/data/'
;
;  loop over all the days erasing the current file
;
FOR i=mjd0,mjd1 DO BEGIN
    d.mjd = i
    date = UTC2YYMMDD(d)
    subdir=dir+STRMID(date,0,4)		; just pick up YYMM
    fname = tt+'_expfactor_'+date+'.dat'
    f = FINDFILE(subdir+'/'+fname)
    IF (f(0) NE '')  THEN BEGIN
       print,'Deleting '+fname
       SPAWN,'/bin/rm '+f(0)
    ENDIF
ENDFOR
RETURN
END
