assign result of findstr to variable
Posted: 19 Feb 2009 20:11
Hi.
First, sorry for my bad English...
I spent 4 hours searching soultion to this problem, on internet, cause i'm begginer at this.
Let's say i have c:\test.txt file. That file has 4 lines of text:
line1
line2
line2
qwertABC
I want to extract ABC from line 4, something like this:
set str=%findstr "ABC" c:\test.txt%
set str=%str:~-3%
but it won't work...
Sorry, if there is already another similiar post, but i didn't find one..
tnks.
First, sorry for my bad English...
I spent 4 hours searching soultion to this problem, on internet, cause i'm begginer at this.
Let's say i have c:\test.txt file. That file has 4 lines of text:
line1
line2
line2
qwertABC
I want to extract ABC from line 4, something like this:
set str=%findstr "ABC" c:\test.txt%
set str=%str:~-3%
but it won't work...
Sorry, if there is already another similiar post, but i didn't find one..
tnks.