I am using batch file to write to a file, and want to not add the same thing if it already being added. I have tried this which has worked.
find "jackdows loves me" %appdata%\data.html || echo jackdows loves me >>%appdata%\data.html
However, I can't make this one work as there are special chars:
find "<!-- saved from url=(0017)http://localhost/ -->" %appdata%\data.html || echo <!-- saved from url=(0017)http://localhost/ --> >>%appdata%\data.html
What is the correct way to do that?
findandechoare not equal (one vs. two spaces before the word "saved") Might it be, that you search for the wrong string (or is it just a typing error)? Besides that, @DavidHoelzer's answer is correct.