Hi,
I am trying to windows service to read files but it reads even the ones I already read.How can I only read new files? this is the code
// Process the list of files found in the directory.
string[] fileEntries = Directory.GetFiles(sourceDir);
foreach (string fileName in fileEntries)
{
// do something with fileName
// Console.WriteLine(fileName);
//added
//read csv file from network
// String infile;
// string path = @"C:\URAFILES\PRNS\+fileName+";
using (StreamReader sr = new StreamReader(fileName))
{
while (sr.Peek() >= 0)
{
String prnt24 = sr.ReadLine();