I would like to use MS-DOS FIND command (or some other method) in a batch to locate a string from TEXTFILE.TXT and store it to a variable. My text file has multiple lines, and the string I search for is always the same "StoreId=" However, it can be on different lines within the text file. Always in the top 10 lines. I am after the value of what StoreId equals for the contents of the variable.
Example line from text file: StoreId=st0028
DOS batch variable contents desired: 0028