Read TXT file and compare strings
Posted: 14 Sep 2010 10:11
Hi,
I am not an expert in batch but i know you guys are experts so I come to you guys for help.
I am trying to manipulate a TXT file to catch a string and compare with other one but i was not able to do it.
I have the folow TXT:
"Executable version : 5.2.4.0
DLL version : 5.2.4.1
>>> Connecting to "database"
>>> Logging on to the database as "*****"
>>> Logon successful
>>> Beginning export..
Connection result:
ResultCode = 0x00000000
ResultDescription = A operação foi concluída com êxito.
Command result:
Command = ExportMachine
ResultCode = 0xdb000004
ResultDescription = O nome não foi encontrado no banco de dados"
I Need to compare the text marked in red with another similar string and check if the two marked in red are equal to the string comparison, both must be equals to the string comparison, and if the result is negative display an error message.
Someone please can help me with this? I'll be very grateful.
Reggards,
Rafael.
I am not an expert in batch but i know you guys are experts so I come to you guys for help.
I am trying to manipulate a TXT file to catch a string and compare with other one but i was not able to do it.
I have the folow TXT:
"Executable version : 5.2.4.0
DLL version : 5.2.4.1
>>> Connecting to "database"
>>> Logging on to the database as "*****"
>>> Logon successful
>>> Beginning export..
Connection result:
ResultCode = 0x00000000
ResultDescription = A operação foi concluída com êxito.
Command result:
Command = ExportMachine
ResultCode = 0xdb000004
ResultDescription = O nome não foi encontrado no banco de dados"
I Need to compare the text marked in red with another similar string and check if the two marked in red are equal to the string comparison, both must be equals to the string comparison, and if the result is negative display an error message.
Someone please can help me with this? I'll be very grateful.
Reggards,
Rafael.