Replacing a line in a text file with a string using a batch file

  • Thread starter Thread starter iladoga
  • Start date Start date
I

iladoga

Guest
Hello, to clear some things up I am not good at using batch files and need some help.

What I am dealing with here is a batch file which runs a loop to check for a .ter file and then adds text to the bottom line to every .ter file in the directory.

The problem is that if I want to replace the text with something different it just adds more text instead of replacing the old text, here is the script:

FOR %%f IN (*.ter) DO type a.txt >> "%%f"

(a.txt is the text file which has the text that i want to insert at the bottom of the .ter file)

I hope someone can help me with this since replacing the text at the bottom of each .ter file will take hours since there are hundreds of them.

Thanks!

Continue reading...
 
Back
Top