I currently have a text file (file.txt) that looks like this sample:
String [date]
data1
String [another date]
data2
String [another date]
data3
I would like to have a batch file that keeps only the string from the first line of each block, knowing that the date is different each time. Here is an example of the output:
String
data1
String
data2
String
data3
Since I have a text file of over 95,000 lines, I think I have to search for lines that contain a specific string, then delete everything on them, except for the string researched.