|I have a batch script where I am doing a for loop. In the referencing txt file each line data1:data2 The number of characters in data1 can be of variable length but data2 is always the same length, both values separated by a :|
No what in my loop there are times where I need to take the entire line data1:data2 as well as times where I take just data1 and others where I take data2. What I am doing in short would be:
for /f "tokens=*" %%i in (datafile.txt) do call :getFiles %%i
This is as close as I have come, but as you will see I am specifying a set value of the first 7 chars for data1 and thats the problem. I'm not sure how to either read all chars up to special character of : or read all chars minus the last 7, either of which would work. Vars statinfo and data2 work fine so dont need assistance with those two.