PRO tidy_ps,test=test @isitdos IF N_Elements(test) GT 0 THEN test=1 ELSE test=0 journal,'c:\ps\tidy.log' files=rFindFile('c:\ps\*.*',Count=nfiles) Print,StrTrim(nfiles,2)+' files found ...' Print,'' arg1=RStrPos(StrUpCase(files),'PS') arg2=(StrLen(files)-2) wps=Where(RStrPos(StrUpCase(files),'PS') EQ (StrLen(files)-2),nwps) Stop IF nwps LT 1 THEN BEGIN Message,'Nothing to do',/Informational Return ENDIF ELSE BEGIN psfiles=files(wps) IF test THEN Print,psfiles,N_Elements(psfiles) IF NOT test THEN BEGIN FOR id=0,N_Elements(psfiles)-1 DO SPAWN,gzipcmd+psfiles(id) ENDIF ENDELSE Journal Return END