Hehe, damn that's like 16 executable extensions! - rather than type them out, this shows what I have so far...
If findtext(".exe", parse$) > -1 Then analyse = 1
If findtext(".scr", parse$) > -1 Then analyse = 1
If findtext(".com", parse$) > -1 Then analyse = 1
If findtext(".bat", parse$) > -1 Then analyse = 1
If findtext(".vbs", parse$) > -1 Then analyse = 1
If findtext(".htm", parse$) > -1 Then analyse = 1
If findtext(".dll", parse$) > -1 Then analyse = 1
If findtext(".vxd", parse$) > -1 Then analyse = 1
If findtext(".pif", parse$) > -1 Then analyse = 1
If findtext(".lnk", parse$) > -1 Then analyse = 1
If findtext(".cpl", parse$) > -1 Then analyse = 1
If findtext(".hta", parse$) > -1 Then analyse = 1
If findtext(".bas", parse$) > -1 Then analyse = 1
If findtext(".cmd", parse$) > -1 Then analyse = 1
If findtext(".reg", parse$) > -1 Then analyse = 1
If findtext(".vbe", parse$) > -1 Then analyse = 1
The findtext function just finds the text in the second string (which is read from the file) - so double extensions should be picked up).
It does'nt actually delete anything, it just renames the extension so you can't run it and it can't run itself - the user can get it working but they'd have to know what type of file it was, so really it'd only be a problem when they're expecting the attachment.
Thanks a bunch for everyones input.
Van-B
It's c**p being the only coder in the village.