FUNCTION findkifile,path,count=nfound ; This little function is useful when the number of KI-generated ; image files matching a particular path is greater than the number ; of files that can be returned to FINDFILE by /bin/sh. It knows ; that the files with the common name will have numerical extensions, ; and looks for them 100 at a time. The results of the various ; searches are concatenated together and returned to the caller. bpath=STRMID(path,0,STRPOS(path,'.')+1) kifnum=0 kiflist='' FOR n=0,9 DO BEGIN kifl=FINDFILE(bpath+STRTRIM(n,2)+'*',COUNT=kifn) IF kifn GT 0 THEN BEGIN IF kifnum GT 0 THEN BEGIN kiflist=[kiflist,kifl] kifnum=kifnum+kifn ENDIF ELSE BEGIN kiflist=kifl kifnum=kifn ENDELSE ENDIF ENDFOR nfound=kifnum RETURN,kiflist END