PRO weedout,yr,mo,day,quiet=quiet ; This procedure checks each file in the image lists for the given ; date, and verifies that the file can be read without errors. If ; this is not the case the procedure deletes the file. After ; checking all files the procedure calls wrilist.pro to rebuild ; the image list file for the given date. ON_ERROR,2 ON_IOERROR, bad_file rm=0 ; Set up OS-specific items @isitdos FOR j=0,1 DO BEGIN rdilist,j,yr,mo,day,0,0,0,n,t,f,quiet=quiet IF n GT 0 THEN BEGIN FOR i=0,n-1 DO BEGIN IF STRPOS(f(i),'___') EQ -1 THEN BEGIN rdkimg,f(i),hb,im imsize=SIZE(im) IF imsize(0) LT 2 THEN GOTO,bad_file ENDIF GOTO,loop_done bad_file: IF NOT KEYWORD_SET(quiet) THEN BEGIN PRINT,'!',FORMAT='(A)' MESSAGE,f(i)+' is corrupt - removed',/INFORMATIONAL ENDIF SPAWN,rmcmd+f(i) rm=1 loop_done: IF NOT KEYWORD_SET(quiet) THEN BEGIN PRINT,'.',FORMAT='(A,$)' IF ((i+1) MOD 80 EQ 0) THEN PRINT,FORMAT='()' ENDIF ENDFOR PRINT,FORMAT='()' ENDIF ENDFOR IF rm THEN wrilist,yr,mo,day,quiet=quiet PRINT,FORMAT='()' RETURN END