예제 #1
0
        static void Main(string[] args)
        {
            CustomConfig = GetConfiguration();

            string     filePath = @"D:\1\1.txt";
            ILog       Log      = new ConsoleLog(CustomConfig);
            FileScaner file     = new FileScaner(filePath, Log, CustomConfig);

            file.PrintFileInfo();

            bool isExist = file.IsExistOtherSymbols();
        }
예제 #2
0
        static void Main(string[] args)
        {
            string filePath     = @"D:1\1.txt";
            string moveFilePath = @"D:\Backup";

            DirectoryInfo moveFileDir = new DirectoryInfo(moveFilePath);

            if (!moveFileDir.Exists)
            {
                moveFileDir.Create();
            }

            ILog       consoleLog = new ConsoleLog();
            FileScaner file       = new FileScaner(filePath, moveFilePath, consoleLog);

            file.PrintFileInfo();

            bool isExist = file.IsExistOtherSymbols();

            if (isExist)
            {
                Console.WriteLine("Press Y to save changes or N - to leave as is");
                string selection = Console.ReadLine();
                switch (selection)
                {
                case "Y":
                    file.MoveFile();
                    file.SaveChanges();
                    Console.WriteLine("The fail was changed");
                    break;

                case "N":
                    Console.WriteLine("The fail was not changed");
                    break;

                default:
                    Console.WriteLine("you press unknown letter");
                    break;
                }
            }
        }