Created
March 12, 2017 22:04
-
-
Save bohack/58f21b6737440ae4fe7afd110025e706 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Const adOpenStatic = 3 | |
Const adLockOptimistic = 3 | |
Const adCmdText = &H0001 | |
Set objConnection = CreateObject("ADODB.Connection") | |
Set objRecordSet = CreateObject("ADODB.Recordset") | |
strPathtoTextFile = "." | |
objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ | |
"Data Source=" & strPathtoTextFile & ";" & _ | |
"Extended Properties=""text;HDR=YES;FMT=Delimited""" | |
objRecordset.Open "SELECT * FROM Ouitable.csv", _ | |
objConnection, adOpenStatic, adLockOptimistic, adCmdText | |
arrRecords = objRecordset.Getrows | |
For row = LBound(arrRecords, 2) To UBound(arrRecords, 2) | |
'wscript.Echo arrRecords(0,row) | |
If ucase(Wscript.Arguments(0))=ucase(arrRecords(0,row)) Then | |
Wscript.Echo "Mac: " & arrRecords(0,row) & " Vendor: " & arrRecords(1,row) | |
End If | |
Next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment