qdebug = 0
;
;-- go to source directory
;
print, 'This routine assumes you are in the source directory'
if (n_elements(outdir) eq 0) then outdir = '/yd6/flares/.'
input, 'Enter the output directory', outdir, outdir
;
fid = uniq_fid('')
;
ss = wmenu_sel(fid)
;
if (ss(0) ne -1) then for i=0,n_elements(ss)-1 do begin
    tot = disktot('*'+fid(ss(i)))/1e+6
    start_time = systime(1)
    cmd = 'cp *'+fid(ss(i)) + ' ' + outdir
    print, cmd 
    if (not qdebug) then spawn, cmd
    end_time = systime(1)
    run_time = (end_time-start_time)
    print, '                                  ', string(tot, format='(f8.1)') + ' megabytes (' + $
						string(tot*1000/(run_time), format='(f8.2)') + ' kbyte/sec)'
end
;
end
