/* WARNING: This script deletes files, which might be lost forever! ** So be careful when you use it! I will not accept any ** responsibility of any damage this script might cause! ** There is no guarantee that messages which are deleted ** really are spam, the script just deletes every small file! ** ** ** KillSpam 1.0 by Kai Nikulainen - 10-Apr-97 ** ** Deletes small messages from a newsgroups directory. I'm using an ** offline newsreader tin, so this might not work for other programs. ** You may need to change UUNEWS: to suit your system in the second line. ** Copy this script to somewhere on your command path and type ** "protect KillSpam +s" and you don't need to use rx to start it ** If you have problems, mail me at knikulai@utu.fi */ parse arg group size dir='UUNEWS:'translate(group,'/','.')'/' if group='' then do say "Usage: KillSpam newsgroup [size]" '0a'x say "Deletes all messages smaller than size from the groups directory." say "If no size is given, 2100 is used as a default" '0a'x say "Example: KillSpam alt.sex.stories 2000 " say " deletes messages smaller than 2000 bytes from " say " UUNEWS:alt/sex/stories" exit end call addlib('rexxsupport.library',0,-30,0) if datatype(size)='CHAR' | size="" then size=2100 say KillThem() 'messages were deleted from' dir exit KillThem: call delete(dir'.overview') c=0 address command 'c:list >t:KillSpam.temp quick files nohead' dir call open(1,'t:KillSpam.temp','r') do while ~eof(1) r=readln(1) if r='' then return c file=dir || r inf=statef(file) parse var inf type bytes . if bytes