{"id":11013,"date":"2021-12-06T22:37:02","date_gmt":"2021-12-06T22:37:02","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=11013"},"modified":"2021-12-06T22:37:28","modified_gmt":"2021-12-06T22:37:28","slug":"solved-vbs-how-to-make-instr-ignore-case","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/vbs-how-to-make-instr-ignore-case\/20560.html","title":{"rendered":"Solved VBS: How To Make Instr Ignore Case?"},"content":{"rendered":"<p>I&#8217;m using a vb script &#8211; here&#8217;s my script:<\/p>\n<p>const ForReading = 1<\/p>\n<p>Set objFSO = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<br \/>\nSet objFile1 = objFSO.OpenTextFile(&#8220;whitelist&#8221;, ForReading)<\/p>\n<p>strCurrentDevices = objFile1.ReadAll<br \/>\nobjFile1.Close<\/p>\n<p>Set objFile2 = objFSO.OpenTextFile(&#8220;ntbtlog.txt&#8221;, ForReading)<\/p>\n<p>Do Until objFile2.AtEndOfStream<br \/>\nstrAddress = objFile2.ReadLine<br \/>\nIf InStr(strCurrentDevices, strAddress) = 0 Then<br \/>\nstrNotCurrent = strNotCurrent &amp; strAddress &amp; vbCrLf<br \/>\nEnd If<br \/>\nLoop<\/p>\n<p>objFile2.Close<\/p>\n<p>Wscript.Echo &#8220;Entries which are not on the whitelist will appear in output.txt&#8221;<\/p>\n<p>Set objFile3 = objFSO.CreateTextFile(&#8220;output.txt&#8221;)<\/p>\n<p>objFile3.WriteLine strNotCurrent<br \/>\nobjFile3.Close<\/p>\n<p>How do I make the &#8220;instr&#8221; comparison ignore case-sensetivity?<\/p>\n<p>Thanks!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":7},"question-category":[55],"question_tags":[],"class_list":["post-11013","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/11013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=11013"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=11013"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=11013"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=11013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}