I have this snippet of script:
for /F "tokens=1* delims=:" %%a in ('findstr /N /C:"%SECTION%" /C:"%TARGET%" %BASE%') do (
echo Search Parameters not found
TARGET are two search parameters. The
BASE file is approximately 16,000 lines.
Here's my problem:
When I execute the for-loop inside a batch script, it searches for 2397 lines exactly, then just gives up. However, if I run the
findstr command manually, it will search all lines as expected.
Does this fail for you? It works here in Win 8 and a XP Pro VM to print 16,000 lines.
@echo off (for /l %%a in (1,1,16000) do @echo 0123456789012345678901234567890123456789)>file SET "section=123" SET "target=456" SET "base=file" ECHO start for /F "tokens=1* delims=:" %%a in ('findstr /NC:"%SECTION%" /C:"%TARGET%" "%BASE%"') do ( ECHO %%a ) pause
Fool's mistake - upon changes of versions, the location of a certain file shifted. So while I thought my search for the file was correct, it actually ended up retrieving a file in similar name, but not the same file (MotionBase.class.asasm vs what I needed: BASE.class.asasm) Thought I checked the location before submitting this question, but apparently not.