In a batch file, I have a string abcdefg
. I want to check if bcd
is in the string.
Unfortunately it seems all of the solutions I\'m find
To find a text in the Var, Example:
var_text="demo string test"
Echo.%var_text% | findstr /C:"test">nul && (
echo "found test"
) || Echo.%var_text% | findstr /C:"String">nul && (
echo "found String with S uppercase letter"
) || (
echo "Not Found "
)
LEGEND:
&
Execute_that AND execute_this||
Ex: Execute_that IF_FAIL execute this&&
Ex: Execute_that IF_SUCCESSFUL execute this>nul
no echo result of command/C:
Use string as a literal search string