Gday guys. I’ve been searching through the forums and there’s lots of answers that seem way more complicated than what I need
All I need is a bat file I can run to change the current 1 line of text in a txt file to something else
Eg sample.txt just has this is it:
Ivory
I need a batch file that when I run it it changes the text to another colour and saves the file
My plan is to have multiple bats with different colours so it just needs to replace whatever is currently there to the new thing. The reason I’m doing it that way doesn’t really matter
Thanks in advance!
Simple replace text in txt file script
Moderator: DosItHelp
Re: Simple replace text in txt file script
If you only have one line (you wrote: sample.txt just has this in it) in the file you could only use
Answer is based on the info you provided.
Saso
Code: Select all
@echo new_color>filename.txt
Saso
Re: Simple replace text in txt file script
Yep thats all i need. Thanks