C:\Temp1>find /c /v "" sample.txt
---------- SAMPLE.TXT: 18
C:\Temp1>
Okay, well, my test text file shows 18 lines, the output shown is 18.
send me a private message please.
very respectfully, booga73
findstr in variable
Moderator: DosItHelp
Re: findstr in variable
booga73 wrote:C:\Temp1>find /c /v "" sample.txt
---------- SAMPLE.TXT: 18
C:\Temp1>
Okay, well, my test text file shows 18 lines, the output shown is 18.
send me a private message please.
very respectfully, booga73
I don't do help over PM.
Your output is ---------- SAMPLE.TXT: 18
That is what you are trying to assign to your variable LineNumb in your FOR command.
You are not assigning the number 18 to LineNumb!
Get it now?
Re: findstr in variable
at this time, presently yes .. . .
---------- SAMPLE.TXT: 18 ---> was being assigned to !LineNumb! and not just the interger 18.
v/r Booga73
---------- SAMPLE.TXT: 18 ---> was being assigned to !LineNumb! and not just the interger 18.
v/r Booga73
Re: findstr in variable
Squashman is right, I posted the method you should use when using FIND. It involves redirection - check my previous post in this thread.