;HISTORY:
;	Written ?? by M.Morrison
;	 2-Jul-97 (MDM) - changed to look all the way to the last dir available
;	 6-Jan-00 (MDM) - Changed how directories are chosen.  Old was to
;			  choose the last 4, now it does it by date
;
if (n_elements(sttim) eq 0) then sttim = anytim2ints(ut_time(), off=-4*24*60.*60)
if (n_elements(entim) eq 0) then entim = ut_time()
;
dirs00 = file_list('/data14/data_eof/sci160k', '*', file=file)
ss = where(strlen(file) eq 6, nss)
if (nss eq 0) then stop
dirs0 = dirs00(ss)
dirs = sel_filetimes(sttim, entim, dirs0, /one_before)
if (dirs(0) eq '') then stop
;
for i=0,n_elements(dirs)-1 do begin
    wrt_sci160k_img, file_list(dirs(i),'*_01.tfr'), '/data14/mdi_summary/daily', 'daily', /subdir_pre
end
;
;n = n_elements(dirs)-1
;n = n_elements(dirs)
;if (n_elements(ist) eq 0) then ist = (n-4)>0
;for i=ist,n-1 do begin
;for i=0,n-1 
;    wrt_sci160k_img, file_list(dirs(i),'*_01.tfr'), '/data14/mdi_summary/daily', 'daily', /subdir_pre
;end
end