clear local lctemp, lcstr, lnpos lctemp = 'TMP' + sys(2015) + '.txt' display status to file &lctemp noconsole lcstr = filetostr(lctemp) lnpos = at('USER-OPENED FILES:',upper(lcstr)) if lnpos > 0 then lcstr = substr(lcstr,lnpos) lcstr = left(lcstr,at('FILE SEARCH PATH:',upper(lcstr))-1) local array lafiles[1] local lxx, lch, lnh for lxx = 1 to alines(lafiles,lcstr) lnpos = at('HANDLE=',upper(lafiles[lxx])) if lnpos > 0 then lch = substr(lafiles[lxx],lnpos + 7) lch = left(lch, at(' ',lch)-1) lnh = val(lch) if lnh > 0 then =fclose(lnh) endif endif endfor endif delete file (lctemp)HTH.
>>* - not closing all left some ascii files open, causing conflicts >> >>Close ALL >>. >>. >>. >>m.filein2='C:\SFW\DATA\'+m.filein >>. >>. >>. >>m.fileout=SUBSTR(m.filein,1,AT('.',m.filein))+'ERR' >>m.handlein = FOPEN(m.filein2,0) >>m.handleout= FCREATE(m.fileout,0) >>