Example #1
0
        public static void Parse(string[] parameters)
        {
            _os = new OptionSet()
            {
                { "d|directory=", "The name of directory to process.", d => ParameterOptions.proccessDirectories(d) },
                { "f|filters=", "Filters to limit file processing.", f => ParameterOptions.processFilters(f) },
                { "o|output=", "Output of processing.", f => ParameterOptions.processOutput(f) },
            };

            _os.Parse(parameters);
        }
Example #2
0
        static void Main(string[] args)
        {
            ParameterOptions.Parse(args);

            DupeFinder dupeFinder = new DupeFinder();

            dupeFinder.DuplicateFound += OutputDuplicateFound;
            FileDictionary fileDictionary = dupeFinder.FindMatches(ParameterOptions.Directories, ParameterOptions.Filters);

            //Write the output files to csv
            Console.WriteLine();
            Console.WriteLine($"\n{fileDictionary.Count} Matches Found\n");
            File.Delete(ParameterOptions.Output);
            File.AppendAllLines(ParameterOptions.Output, fileDictionary.ToStringArray());

            SelectAndDeleteDuplicates(fileDictionary);
        }