45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace PDFGenerator.Verifier.App
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
try {
|
|
string folder = @"E:\ReportisticaTrimestrale\pdf\";
|
|
int threads = 10;
|
|
|
|
if (args.Count() >= 1) folder = args[0];
|
|
if (args.Count() >= 2) threads = Int32.Parse(args[1]);
|
|
|
|
using (Verifier v = new Verifier())
|
|
{
|
|
Console.WriteLine("checking folder {0}", folder);
|
|
DirectoryInfo di = new DirectoryInfo(folder);
|
|
Console.WriteLine("{0} total files available", di.GetFiles().Count().ToString());
|
|
Console.WriteLine("processing, using {0} threads", threads.ToString());
|
|
var list = v.GetInvalidFiles(folder, threads);
|
|
Console.WriteLine("found {0} invalid files", list.Count.ToString());
|
|
string text = String.Empty;
|
|
foreach (string s in list)
|
|
Console.WriteLine(s);
|
|
Console.WriteLine("done!");
|
|
|
|
}
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
Console.WriteLine(ex.Message);
|
|
}
|
|
Console.WriteLine("press enter to close application");
|
|
Console.ReadLine();
|
|
}
|
|
}
|
|
}
|