1.

Solve : search for string in file and remove that line?

Answer»

Hey all,
I am trying to figure out a way to search for a text string WITHIN a FILE, and if found, delete the entire line that it is on. Is there a simple way to do that?
I know that i can use find command from command line, but i dont' think that WORKS within a batch file.
Thanks,
JasonAll a batch file is is a bunch of DOS commands in one, so if it can be DONE from the prompt, it can be done in BATCH.Yeah, i FIGURED that out after i posted. My solution was to do a findstr with /V and >> to another file. i then just copied over the original. Anyone have a better solution?



Discussion

No Comment Found