I need some help. I want to execute for loop with if-else statement but i got some error. This is my code
mysql -u%UserName% -N -B -e "SHOW DATABASES LIKE '%%sample%%';" | FOR /F %%D IN ('C:\Windows\System32\findstr /V "information_schema performance_schema"') DO (IF EXIST %pathx%\%%D (echo test) ELSE (echo fail))
The output is
< was unexpected at this time
%pathx%?mysqlcommandmysqlcommand mysql -u%UserName% -N -B -e "SHOW DATABASES LIKE '%%sample%%';" into afor/fcommand. I've asked for a sample output of thatmysqlcommand.