Batch to delete line from text file host

June 6, 2017 at 06:06:47
Specs: Windows 7
I need help to delete a line from host text file using batch script.

File is located in C:\Windows\System32\drivers\etc

Name of file is host*

There is IP address on the line 23 and we want a batch file to delete it and save it.

Also all the text files may not start with the same IP address. Is it possible to add an IP address that starts with 199.xxx.xxx.xx?

I am new and need help.

Will be great if someone could help me on this.

Thank you

message edited by a91


See More: Batch to delete line from text file host

Reply ↓  Report •

#1
June 6, 2017 at 18:06:19
Unless someone else here can read minds, I think your problem description needs a tune-up, and also some examples of a couple of the host* files. First, there's a "line 23", then there's a hint of a "mask" (always on line 23?). I am confused...

Reply ↓  Report •
Related Solutions


Ask Question