mardi 31 mars 2015

Reading all text files in a network path in a WinForms app

How can i read all the text files in a network path in C# Winforms?. The text files name are always changing.


example:



  • ABC-GD09538.txt

  • ADB-JK3949.txt

  • GJD-KGL9495-txt


The format of each text file when opened is:



Some Text
Some Text
Some Text
Some Text

[data start]
"Data1"|"Data2"|"Data3"|"Data4"|"Data5"|"Data5"|"Data6"
[data end]


I would also like to ignore the "some text" part of text file and proceed the text file reading on the line [data start] and end it on the line [data end] then finally perform a query to database and then insert the data received from text files to a table.


Aucun commentaire:

Enregistrer un commentaire