Instead of using Instr() you should compare (=) the file's .Name with the constant "web.config":
>> For Each s In Split("web.config web.configx")
>> WScript.Echo s, "InStr", CStr(1 = Instr(s, "web.config"))
>> WScript.Echo s, "Equal", CStr(s = "web.config")
>> WScript.Echo
>> Next
>>
web.config InStr True
web.config Equal True
web.configx InStr True
web.configx Equal False
(There is a 'web.config' at pos 1 in "web.config..whatever..", but 'web.config' is not equal to "web.config..whatever..")