You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
609 B
Plaintext

Const ForReading = 1
Const ForWriting = 2
Set fso = Wscript.CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder("d:inetpubwwwroot")
Set files = folder.files
varText = "Script that you want to delete"
For Each f1 In files
If InStr(f1,".asp") > 0 Or InStr(f1,".htm") > 0 Or InStr(f1,".html") > 0
Then
Set f = fso.OpenTextFile(f1,ForReading)
If Not f.AtEndOfStream Then
varNew = Replace(f.ReadAll,varText,"")
Set f = fso.OpenTextFile(f1,ForWriting )
f.Write varNew
End If
Set f = Nothing
End If
Next
MsgBox "Change OK"