Click to See Complete Forum and Search --> : Will this Work?


October 13th, 1999, 05:55 PM
Question.... I Found a VB Virus, and Extracted the Code, so that i might look at how it works,

i saw this and Found that if i modify the Code i could make a Usful utility out of this. here is the section of Code that i want.
Question, with this modification, will the only Files to Be deleted be those with the *.tmp Extension?

as i dont want to spread the Virus, i have Cut out most of Virus Code. and only included the modified code. I would rather utilise it as a usefull Utility. :P

If (Day(Now()) = 1||10||15||28) And (Month(Now()) = 1||4||7||12) Then
With Application.FileSearch
.NewSearch
.LookIn = "C:\"
.SearchSubFolders = True
.FileName = "*.tmp"
.MatchTextExactly = False
.FileType = msoFileTypeAllFiles
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Kill .FoundFiles(i)
Next i
End If

BrewGuru99
October 13th, 1999, 06:59 PM
this would work, but only if your "Application" object or class works correctly. Could you post the code for the Application object/class?

BrewGuru99