|I found the code|
@echo off > new.txt
for %%T in (*.txt) do find "A10:@" < %%T >> new.txt
Wish to look in a directory at all the .txt files and extract the lines within the file that starts with A10:@.
For some reason when I run the above code it doubles the lines in the new text file. when the old file contains 4 lines which starts with A10:@ the new file created has 8.
Utilmatley I really only want the first 16 characters after the @ symbol not the entire line. The 17th character after the @ is always a * so I could just extract the data between A10:@ and * abd write it to a file.
The following code almost worked
for /f "tokens=2 delims= " %%a in ('find "A10:@" ^< myfile') do (
Thanks in advance.