FUNCTION getwid, prefix, dir ; ---------------------------------------------------------------- ; -------------------------------------------------------------- cd, '', current=olddir ;save old dir cd, dir fns = findfile(prefix+'*') ;get files names IF fns(0) ne '' then begin len = MAX(strlen(fns)) ids = strmid(fns, 3, len-3) tim2orbit, (fid2ex(ids)), wid=wids ;get the wids wids = wids(uniq(wids, sort(wids))) ;just list of unique ENDIF ELSE BEGIN wids = '' ENDELSE cd, olddir ;return to original dir return, wids end