It's hard to give a definitive answer because it's not clear what you mean by very simple search and replace, but here are all the elements needed:
Reading a file
You can read a file line by line using for /f :
for /f %%a in (myfile.txt) do (
echo %%a
)
Replace text
Here's one way I know how to replace text occurrences:
SETLOCAL ENABLEDELAYEDEXPANSION
for /f "delims=" %%a in (myfile.txt) do (
SET s=%%a
SET s=!s:stringtoreplace=replacementstring!
echo !s!
)
This will output all lines of myfile.txt and replace stringtoreplace with replacementstring .
Overwrite a file
You may consider writing first into a new temporary file, and then replacing the original file with the new temporary one.
With the above examples, it's as simple as adding >>yourtempfilename.txt after the echo statements.
Filter lines of a file
If you simply want to delete some lines from a file, you may also consider the findstr command (help findstr).