IF statement with FIND
Posted: 17 Mar 2010 11:58
I'm not sure the best way to go about doing this...
Ultimately I want to run a MySQL query and run that into a DOS FIND command...from that point, I want to be able to "do" something with the output. Perhaps with an IF statement.
This is what I had in mind:
SET MYSQLOUTPUT=mysql.exe -uroot -ppassword --execute="use db_name;select field from table;"
%MYSQLOUTPUT% | find "string"
After this point is where I'm stuck...
I'd like to be able do something like "IF this string is found...DO this...or goto another function"
Ultimately I want to run a MySQL query and run that into a DOS FIND command...from that point, I want to be able to "do" something with the output. Perhaps with an IF statement.
This is what I had in mind:
SET MYSQLOUTPUT=mysql.exe -uroot -ppassword --execute="use db_name;select field from table;"
%MYSQLOUTPUT% | find "string"
After this point is where I'm stuck...
I'd like to be able do something like "IF this string is found...DO this...or goto another function"