topdir='/sxi02/sxifm1a/latest_events'
currdir=concat_dir(topdir,'last_events')
subdir=currdir + '_temp'
subdir=concat_dir(topdir,'last_events_temp')

goesn=13
ssw_gev_locator,reltime(days=-12,/day_only), goesn=goesn, reltime(/now), subdir=subdir,/www
ssw_last_event_summary,subdir
ssw_path,/pfss
ssw_les_patch,/temp
ssw_last_event_summary_mag,subdir,corcadence=18

fnow=time2file(reltime(/now))
bdir=currdir+'_'+fnow

spawn,['mv','-f',currdir,bdir],/noshell
spawn,['mv','-f',subdir,currdir],/noshell

;ssw_purge_les,/noprompt,hours=24
end
