I need a batch file that will add the text "Write In" in a new line at the beginning of the content of hundreds of .txt files without removing any existing text. I found something on here that did not work for me. Anyone have suggestions?
This is the code I was working with:
for /r %%a in (*.txt) do (
echo ---- %%a before ----
type "%%a"
echo --------------------
echo Write In > "%%a.tmp"
type "%%a" >> "%%a.tmp"
del "%%a"
move "%%a.tmp" "%%a"
echo ---- %%a after ----
type "%%a"
echo --------------------
)
pause
It did nothing