Exemplo n.º 1
0
        // STATUS [ July 31, 2019 ] : this works
        // STEP 2: move the CSV from local downloads folder to project Target_Write folder
        // * Looks for the file that was last updated in local downloads
        // * This should not run if a Csv file for current day already exists
        // * Once it finds last updated file, it moves and renames the file
        // * Ends up something like: "SpWpdiReport_07_09_2019.csv"
        public void MoveCsvToProjectFolder(string filePathToSaveCsv, string fileNamePrefix, int reportMonth = 0, int reportYear = 0, int reportDay = 0)
        {
            _helpers.OpenMethod(1);
            string downloadsFolder = _endPoints.LocalDownloadsFolderLocation();

            _csvHandler.MoveCsvFileToFolder(
                downloadsFolder,
                filePathToSaveCsv,
                fileNamePrefix,
                month: reportMonth,
                year: reportYear,
                day: reportDay
                );
            PrintCsvMoveInfo(downloadsFolder, filePathToSaveCsv, fileNamePrefix, reportMonth, reportDay, reportYear);
        }