0

These two work seperately but I can't get then to work on the same line, and then to redirect to a text file..

FINDSTR "\""" testingbatch.txt > results.txt

FINDSTR "< >" testingbatch.txt > results.txt

Combined:

FINDSTR /V "^< ^> \"" testingbatch.txt > results.txt

Works as long as I don't try to redirect the output to a file.

2
  • Could you include an example of the command with both on the same line (even if it doesn't work)? Could you edit and add an example text input file, and example expected output?
    – Bob
    Jun 12, 2012 at 14:33
  • @JSW please register so that you have control over your content even after losing your session cookie.
    – Sathyajith Bhat
    Jun 12, 2012 at 15:30

2 Answers 2

1

FINDSTR "< > \"" works for me.

example.txt:

zero
one "foo"
two < >
three >
four <
five > < "
six


C:\Users\foo>findstr /V "< > \"" example.txt
zero
six
4
  • Welcome to Super User! This is really a comment, not an answer. Please post it as a comment on the question. I'm flagging this post for deletion but feel free to remove it yourself. Jun 12, 2012 at 11:49
  • It actually is an answer. But feel free to delete it. Jun 12, 2012 at 12:14
  • OK, maybe I acted too quickly. But your answer reads like you aren't sure yourself if it is the right solution or not. It is also very short, which is often an indicator that an answer should be a comment. So it feels like a comment to me. I can't and wouldn't delete your answer. A moderator will decide that. Jun 12, 2012 at 12:22
  • Well, you are kind of right. I wasn't sure if he tried the obvious and it didn't work. I'll rephrase. Jun 12, 2012 at 12:40
0

The reason your example did not work when redirecting the output DUSAN is because you were missing a set of quotes.

Here is the expression that works with the added quotes:

**

FINDSTR /V "< > \""" testingbatch.txt >> resultsWO2.txt

**

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .