Delete row if row contains 000

2019-09-21 11:40发布

问题:

I have the following code:

set local enabledelayedexpansion for /f "delims=" %%a in  (\\file) do ( 
  SET ='%%a 
  SET s=!s:;'';'=;;%!
  echo !s!
)  >>   \\file"

I need apart from the modification, to delete the row if contains 00. So far i have tried to add the following set but is not working.

回答1:

Does

FIND /V "000"<"TXTFILE.TXT">"NEWFILE.TXT"

or

TYPE "TXTFILE.TXT"|FIND /V "000">"NEWFILE.TXT"

not do what you want?