dir_out = ['/0d0/ops/reformat/', '/0d2/ops/reformat/']
dir_in  = ['/0d1/ops/raw/',      '/0d3/ops/raw/']
;
for j=0,n_elements(dir_out)-1 do begin
    ff = findfile(dir_in(j) + '*')
    ff = findfile(dir_in(j) + '*.tel')		& print,'Only selecting *.TEL', string(7b)
    if (ff(0) ne '') then for i=0,n_elements(ff)-1 do begin
        infil = ff(i)
        close, 1
        openr, 1, infil
        f = fstat(1)
        if (f.size gt 100000) then begin
	    not_sxt_patrol = 0
	    if (strpos(infil, '.tel') ne -1) then not_sxt_patrol = 1	;there were buffer dump then that were not patrol images
	    if (strpos(infil, '910903') ne -1) then not_sxt_patrol = 1

	    reformat, infil, dir=dir_out(j), /all, not_sxt_patrol=not_sxt_patrol		;/sxt			; /all
        end
        close, 1
    end
end
;
end
