Page 1 of 1

Findstr help

Posted: 29 Jul 2009 03:56
by rfpd
How I do a findstr who can find and if he find something he delete the results?

Posted: 29 Jul 2009 11:53
by avery_larry
First -- what? I don't think I understand what you're asking.

But, maybe this:

(using findstr syntax from memory)
findstr /c:"your text to search for" c:\yourfile.txt
if not errorlevel 1 del c:\yourfile.txt

Thanks

Posted: 30 Jul 2009 11:05
by rfpd
thanks men it works but the code is not correct the first line so i make changes:

Code: Select all

findstr ola c:\yourfile.txt
if not errorlevel 1 del c:\yourfile.txt

Sorry

Posted: 30 Jul 2009 11:21
by rfpd
Sorry my english i am portuguese and i am 13 years old i am learning more about english thanks you are great!