static List <string> UnZipCVSFile(string zipFile)
        {
            var unZipDirectory = GetUnzipDirectory(zipFile);

            CleanDirectory(unZipDirectory);
            ZipFile.ExtractToDirectory(zipFile, unZipDirectory);

            return(SearchFilesService.FindAllCSVFiles(unZipDirectory));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var zipFiles = SearchFilesService.FindAllZipFiles();

            var countZipFiles = zipFiles == null ? 0 : zipFiles.Count;

            Console.WriteLine($"Find {countZipFiles} zip files. In {Constans.FilesSourceDirectory}");

            var cvsFiles = HandlingFilesService.UnZipCVSFiles(zipFiles);

            var countCVSFiles = zipFiles == null ? 0 : cvsFiles.Count;

            Console.WriteLine($"Unpack {countZipFiles} cvs files.");

            HandlingFilesService.HandleCSVFiles(cvsFiles);

            Console.ReadLine();
        }