Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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 '12 at 14:33
    
@JSW please register so that you have control over your content even after losing your session cookie. –  Sathya Jun 12 '12 at 15:30

2 Answers 2

FINDSTR "< > \"" works for me.

example.txt:

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


C:\Users\foo>findstr /V "< > \"" example.txt
zero
six
share|improve this answer
    
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. –  Oliver Salzburg Jun 12 '12 at 11:49
    
It actually is an answer. But feel free to delete it. –  dusan.bajic Jun 12 '12 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. –  Oliver Salzburg Jun 12 '12 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. –  dusan.bajic Jun 12 '12 at 12:40

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

**

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.