Reputation: 31
I can't figure out how to do what it says in the title. I have a text file apple.txt with:
set apple=7
and a file saved as a batch with
findstr /v "zzzzzzzzzzz" apple.txt
and when I run the batch file it displays "set apple=7" instead of actually setting the variable apple to 7. I'm assuming findstr
adds an echo
before each line but I don't know. I used the CMD with findstr /? but I can't figure this out.
Upvotes: 0
Views: 32
Reputation: 767
I am not sure what you are doing with the find string. But if you have a file named out.txt with the following code:
dir
And from the command line you type:
cmd < out.txt
The contents of the file is piped into the command line processor.
Upvotes: 0