I want to edit a text file from command prompt in Windows 7. I have a text file, i want to search for particular String in that file. then I need to append some more string to string.
Then, I need to save or over write it.
I want to edit a text file from command prompt in Windows 7. I
Share
The batch command language is not well-suited to this sort of task. You would be much better served using some other scripting language, like js or vbs or (if you are targeting Windows 7) powershell. If you really want to do it in the batch command language, you can sort of cobble something together with
for /fto read from the input file andechoto write to the output file. Mind you, it won’t be fun.