Solved

Reading a text file.

Posted on 2014-07-28
1
283 Views
Last Modified: 2014-08-20
Hi,
Can anybody suggest some code that would allow me to open and then read a text file and then return the results within a datatable?
The complicated element is that this code will run inside a Window Service so I only want to read entries that have been written within the past 24 hrs.  

The log data looks like this:

25/07/2014 15:55:55 - Log Data
25/07/2014 16:05:57 - Log Data
25/07/2014 16:05:58 - Log Data
28/07/2014 07:41:43 - Log Data
28/07/2014 08:10:27 - Log Data

There can be any number of logs written and each is usually under 255 characters.

TIA
0
Comment
Question by:andyw27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 57

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 40223650
Are you able to store and maintain the last position you processed up to (another file, registry)?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question