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,'' wps=Where(StrPos(StrUpCase(files),'PS') EQ StrLen(files)-2,nwps) 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 BEGIN SPAWN,gzipcmd+psfiles(id) del,psfiles(id) ENDFOR ENDIF ENDELSE Journal Return END