I’m trying to make a HTML file with command line, but there is one problem. I need the quotes otherwise the echo doesn’t work. But now the quotes are also displayed on the HTML page. This is my code:
FindStr "BUILD SUCCESSFUL" test1.txt
echo "<html><body><table><tr><td>Plugin</td><td>Resultaten</td></tr>" > goedje.html
if %ERRORLEVEL% ==1 (echo "<tr BGCOLOR="#FF0000"><td>Build</td><td>Fout!</td></tr>" >> goedje.html ) else (echo "<tr BGCOLOR="#00FF00"><td>Build</td><td>Gelukt!</td></tr>" >> goedje.html)
echo "</table></body></html>" >> goedje.html
If i’m doing it without the quotes then the program doesn’t run!
In
windows, you can use^to escape<and>