private void PopulateInvoices(FileInfo[] invoices) { List <IInvoice> output = new List <IInvoice>(); foreach (FileInfo file in invoices) { output.Add(AnalyserTools.GetInvoiceModel(file)); } _invoices = output.ToArray(); }
public void OrganiseFiles() { var irt = InvoiceRenamingTargets(); CreateInvoiceDirectory(); foreach (FileInfo invoice in irt) { var date = AnalyserTools.GetDate(invoice); var TaxYear = AnalyserTools.IdentifyTaxYear(date); WorkingInvoiceDirectory.CreateSubdirectory(TaxYear); MoveFile(invoice, date, TaxYear, 0); } }