Beispiel #1
0
        private static void Compare()
        {
            Console.Clear();
            Console.WriteLine("Please input location of .txt file list");
            var listPath = Console.ReadLine();

            Console.WriteLine("Input directory path for compare");
            var directoryPath = Console.ReadLine();

            var hardCopyDrawings    = GetDrawingList.FromList(listPath);
            var drawingsInRendition = GetDrawingList.FromDirectory(directoryPath);

            var results = hardCopyDrawings.Except(drawingsInRendition);

            Output.ResultsWriter(results.ToList());
        }
Beispiel #2
0
        private static void Move()
        {
            Console.Clear();
            Console.WriteLine("Input directory path for file that need to be moved");
            Creator.CreateDirectory();
            var pathToScannedDrawing   = Console.ReadLine();
            var pendingScannedDrawings = GetDrawingList.FromDirectory(pathToScannedDrawing);
            var startTime = DateTime.Now.ToString("MM-dd-yyyy hh:mm:ss tt");

            MoveFileLogger.StartLog(startTime);

            foreach (var drawing in pendingScannedDrawings)
            {
                var exceptiondestination = Path.Combine(@"\\sscowbfs03\cadd\Rendition\Exception\" + drawing.drawingName);
                var directory            = " ";

                if (drawing.drawingLocation == "005")
                {
                    directory = GeneralFacilityDictionary.GetDestination(drawing);
                }
                else
                {
                    directory = Dictionary.GetDestination(drawing);
                }

                if (directory == null)
                {
                    var errorFile = drawing.drawingName;
                    File.AppendAllText(@"\\sscowbfs03\cadd\Rendition\Exception\MoveLog.txt", "The Following File Is Has no Destination: " + errorFile + Environment.NewLine);
                    File.Copy(drawing.drawingPath, exceptiondestination, false);
                }
                else
                {
                    CopyFiles(drawing, directory, exceptiondestination);
                }
            }

            var endTime = DateTime.Now.ToString("MM-dd-yyyy hh:mm:ss tt");

            MoveFileLogger.EndLog(endTime);
        }