Finding Words in a File and Copying Strings
Posted: 13 Apr 2013 16:17
Hi everyone
I have a file db.txt and it's something like this:
---------start of db.txt
'a'=b
'b'=c
'c'=d
---------end of db.txt
What I want the batch to do is to find a user provided letter (a, b or c) and copy the letter that's next to the "=".
I already know how to find words or letters in a file:
But I don't know how to make the batch copy the letter that's next to the = symbol.
Thanks for reading and please help
I have a file db.txt and it's something like this:
---------start of db.txt
'a'=b
'b'=c
'c'=d
---------end of db.txt
What I want the batch to do is to find a user provided letter (a, b or c) and copy the letter that's next to the "=".
I already know how to find words or letters in a file:
Code: Select all
FINDSTR /C:"('a', 'b' or 'c')" db.txt > nul
But I don't know how to make the batch copy the letter that's next to the = symbol.
Thanks for reading and please help