In my .bat file below I am getting the following results.
@echo off
set result=""
set filteredResult=""
setlocal enabledelayedexpansion
FOR /F "tokens=* delims=" %%x in (outputText.txt) DO (SET result=%%x & SET filteredResult=%result:~0,5% & echo !filteredResult!)
pause
outputText.txt
tables
--------------------------
number one
number two
number three
(3) lines
Results
""
""
""
""
""
""
Press any key to continue . . .
Why am I not getting a substring of 5 from result.?