How do I get the files that have .cpv extension in my path:
\\S3A601\ftp@secretaria\bank\Exit_SDPJ\test
How to adapt in my code?
Here's my code:
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- using System.ServiceProcess;
- using System.Text;
- using System.Threading.Tasks;
- using System.Timers;
-
- namespace ServicoProcessamentoComprovantes
- {
- public partial class Service1: ServiceBase
- {
- private Timer timer1 = null;
- public Service1 ()
- {
- InitializeComponent ();
- }
-
- protected override void OnStart (string [] args)
- {
- StreamWriter write = new StreamWriter (@ "c: \ ServiceBanestes.txt", true);
- write.WriteLine ("Service started:" + DateTime.Now.ToString ());
- write.Flush ();
- write.Close ();
- }
- protected override void OnStop ()
- {
- StreamWriter write = new StreamWriter (@ "c: \ ServiceBanestes.txt", true);
- write.WriteLine ("Process Stopped:" + DateTime.Now.ToString ());
- write.Flush ();
- write.Close ();
- }
- }
- }