Hi im pretty new to coding and my problem is this:
i have multible files that looks like this:
XL2 STIPA Reporting: Lundsgaard\2020-04-22_STIPA_003_Report.txt
---------------------
# Hardware Configuration
Device Info: XL2, SNo. A2A-13445-E0, FW3.33
Mic Type: NTi Audio M4261, SNo. 1415, Factory adjusted
Mic Sensitivity: 18.2 mV/Pa
Time Zone: UTC+00:00
# Measurement Setup
Profile: Full mode
Append mode: OFF
IEC 60268-16: ed4.0 2011
# STIPA Results
Date Time Date Time STIPA CYCLE
[YYYY-MM-DD] [hh:mm:ss] [YYYY-MM-DD] [hh:mm:ss] [STI] [STI]
2020-04-22 08:17:50 2020-04-22 08:18:05 0.52
#CheckSum
05B7A6993DB1C9183A2B162EC702EDA8
-----------------------------------------------------------
There is more columns after the Cycle part but i only wants to get to STIPA column.
I think parse the column part, but i cant see how. Rigth now i have used ReadAllText, and guesing its something with ReadLines instead.
Some advice would be really apreaciated, atleas some pointers what way i need to go..
from
Jonas a beginner on deep water
What I have tried:
//STIPA raport funktion------------------------------------------------------------------------------------------------------------
private void btnSTIPAReport_Click(object sender, EventArgs e)
{
List<string> stringList = new List<string>();
string[] files = System.IO.Directory.GetFiles(textBoxInput.Text, "*_STIPA_*_Report.txt");
foreach (string file in files)
{
stringList.Add(System.IO.File.ReadAllText(file));
}
string resultText = string.Join("", stringList.ToArray());
using (StreamWriter outFile = new StreamWriter(textBoxOutput.Text + "\\Combined STIPA measurements.txt"))
{
outFile.Write(resultText);
}
}