From 60fcb2d9dad83d49f97f129f5817968ac87c3972 Mon Sep 17 00:00:00 2001 From: r57zone Date: Sat, 17 Oct 2020 15:25:52 +0400 Subject: [PATCH] Improvement: file movement recognition --- Source/Languages/English.ini | 4 + Source/Languages/Russian.ini | 4 + Source/Project1.dproj | 463 ++++++++++++++++++++++++++++++++++- Source/Project1.res | Bin 34576 -> 34684 bytes Source/Unit1.pas | 152 +++++++++--- 5 files changed, 582 insertions(+), 41 deletions(-) diff --git a/Source/Languages/English.ini b/Source/Languages/English.ini index d81b9bf..61c1d6c 100644 --- a/Source/Languages/English.ini +++ b/Source/Languages/English.ini @@ -19,10 +19,12 @@ ID_FOUND_NEW_FILE=Found new file: ID_FILE_UPDATED=File updated: ID_FOUND_OLD_FILE=Found old file: ID_COPY_FILE=File is being copied: +ID_COPY_FILE=File is being moved: ID_RENAME_FILE=File is being renamed: ID_REMOVE_FILE=File is being deleted: ID_CREATE_FOLDER=Folder is being created: ID_REMOVE_FOLDER=Folder is being deleted: +ID_CHECK_MOVE_FILES=Checking files for movement ID_COMPLETED=Completed ID_COMPLETED_ERROR=Completed with errors @@ -31,11 +33,13 @@ ID_BACKUP_FAILED=There were problems creating a backup. ID_CHECK_FILES=Checked files: ID_TOTAL_OPERATIONS=Total operations: ID_SUCCESS_COPY_FILES=Successfully copied files: +ID_SUCCESS_MOVE_FILES=Successfully moved files: ID_SUCCESS_RENAME_FILES=Successfully renamed files: ID_SUCCESS_REMOVE_FILES=Successfully removed files: ID_SUCCESS_CREATE_FOLDERS=Successfully created folders: ID_SUCCESS_REMOVE_FOLDERS=Successfully removed folders: ID_FAIL_COPY_FILES=Failed to copy files: +ID_FAIL_MOVE_FILES=Failed to move files: ID_FAIL_RENAME_FILES=Failed to rename files: ID_FAIL_REMOVE_FILES=Failed to remove files: ID_FAIL_CREATE_FOLDERS=Failed to create folders: diff --git a/Source/Languages/Russian.ini b/Source/Languages/Russian.ini index 4148ff0..1c5079d 100644 --- a/Source/Languages/Russian.ini +++ b/Source/Languages/Russian.ini @@ -19,10 +19,12 @@ ID_FOUND_NEW_FILE= ID_FILE_UPDATED=Ôàéë îáíîâëåí: ID_FOUND_OLD_FILE=Íàéäåí ñòàðûé ôàéë: ID_COPY_FILE=Èä¸ò êîïèðîâàíèå ôàéëà: +ID_MOVE_FILE=Èä¸ò ïåðåìåùåíèå ôàéëà: ID_RENAME_FILE=Èä¸ò ïåðåèìåíîâàíèå ôàéëà: ID_REMOVE_FILE=Èä¸ò óäàëåíèå ôàéëà: ID_CREATE_FOLDER=Èä¸ò ñîçäàíèå ïàïêè: ID_REMOVE_FOLDER=Èä¸ò óäàëåíèå ïàïêè: +ID_CHECK_MOVE_FILES=Ïðîâåðêà ôàéëîâ íà ïåðåìåùåíèå ID_COMPLETED=Çàâåðøåíî ID_COMPLETED_ERROR=Çàâåðøåíî ñ îøèáêàìè @@ -31,11 +33,13 @@ ID_BACKUP_FAILED= ID_CHECK_FILES=Ïðîâåðåíî ôàéëîâ: ID_TOTAL_OPERATIONS=Âñåãî îïåðàöèé: ID_SUCCESS_COPY_FILES=Óñïåøíî ñêîïèðîâàííûõ ôàéëîâ: +ID_SUCCESS_MOVE_FILES=Óñïåøíî ïåðåìåù¸ííûõ ôàéëîâ: ID_SUCCESS_RENAME_FILES=Óñïåøíî ïåðåèìåíîâàííûõ ôàéëîâ: ID_SUCCESS_REMOVE_FILES=Óñïåøíî óäàëåííûõ ôàéëîâ: ID_SUCCESS_CREATE_FOLDERS=Óñïåøíî ñîçäàííûõ ïàïîê: ID_SUCCESS_REMOVE_FOLDERS=Óñïåøíî óäàë¸ííûõ ïàïîê: ID_FAIL_COPY_FILES=Íå óäàëîñü ñêîïèðîâàòü ôàéëîâ: +ID_FAIL_MOVE_FILES=Íå óäàëîñü ïåðåìåñòèòü ôàéëîâ: ID_FAIL_RENAME_FILES=Íå óäàëîñü ïåðåèìåíîâàòü ôàéëîâ: ID_FAIL_REMOVE_FILES=Íå óäàëîñü óäàëèòü ôàéëîâ: ID_FAIL_CREATE_FOLDERS=Íå óäàëîñü ñîçäàòü ïàïîê: diff --git a/Source/Project1.dproj b/Source/Project1.dproj index 0cdeecd..18570b7 100644 --- a/Source/Project1.dproj +++ b/Source/Project1.dproj @@ -1,7 +1,7 @@  {BDAEF3FB-DE22-480B-913A-DE52B2071C21} - 18.4 + 18.8 VCL Project1.dpr True @@ -83,11 +83,11 @@ false true - true false true true 1033 + PerMonitor false @@ -97,10 +97,10 @@ true - true true 1033 Icon.ico + PerMonitor @@ -181,7 +181,6 @@ 1 - Contents\MacOS 0 @@ -190,6 +189,20 @@ classes 1 + + classes + 1 + + + + + res\xml + 1 + + + res\xml + 1 + @@ -202,90 +215,242 @@ library\lib\armeabi 1 + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + library\lib\mips 1 + + library\lib\mips + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + res\drawable 1 + + res\drawable + 1 + res\values 1 + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + res\drawable 1 + + res\drawable + 1 + res\drawable-xxhdpi 1 + + res\drawable-xxhdpi + 1 + res\drawable-ldpi 1 + + res\drawable-ldpi + 1 + res\drawable-mdpi 1 + + res\drawable-mdpi + 1 + res\drawable-hdpi 1 + + res\drawable-hdpi + 1 + res\drawable-xhdpi 1 + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + res\drawable-small 1 + + res\drawable-small + 1 + res\drawable-normal 1 + + res\drawable-normal + 1 + res\drawable-large 1 + + res\drawable-large + 1 + res\drawable-xlarge 1 + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + @@ -305,6 +470,11 @@ 1 .framework + + Contents\MacOS + 1 + .framework + 0 @@ -327,6 +497,11 @@ 1 .dylib + + Contents\MacOS + 1 + .dylib + 0 .dll;.bpl @@ -350,6 +525,11 @@ 1 .dylib + + Contents\MacOS + 1 + .dylib + 0 .bpl @@ -359,6 +539,9 @@ 0 + + 0 + 0 @@ -372,6 +555,10 @@ Contents\Resources\StartUp\ 0 + + Contents\Resources\StartUp\ + 0 + 0 @@ -387,6 +574,17 @@ 1 + + + 1 + + + 1 + + + 1 + + 1 @@ -398,6 +596,39 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -409,6 +640,61 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -420,6 +706,116 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 @@ -453,10 +849,35 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + 1 + + 1 + @@ -508,29 +929,51 @@ 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + ..\ 1 + + ..\ + 1 + Contents 1 + + Contents + 1 + Contents\Resources 1 + + Contents\Resources + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + 1 @@ -547,10 +990,20 @@ Contents\MacOS 1 + + Contents\MacOS + 1 + 0 + + + library\lib\armeabi-v7a + 1 + + 1 @@ -586,7 +1039,9 @@ + + True diff --git a/Source/Project1.res b/Source/Project1.res index 3a775c59296e96c0c95bb581e9265b2a4b4ec44e..8c46b9b39a1e96f82abe5316a54cb9ac76d03834 100644 GIT binary patch delta 142 zcmbQx$MmO_QdF9%Uyy5~4->^u zmX}&QS*TG*$IwhaJTosPzq~j&wWK67FTGgFE+DnYH$N}4B)FNpvE delta 74 zcmey<$26gjX@fum(|oqgLJf?JlRF!=C;K;wC~+x(flW$5rek?xQL0@?QE94vfUk`{ UOl0$eMm?s@JS}?6lWp1^0HNR*{{R30 diff --git a/Source/Unit1.pas b/Source/Unit1.pas index 8dfb456..52b2146 100644 --- a/Source/Unit1.pas +++ b/Source/Unit1.pas @@ -37,6 +37,7 @@ TMain = class(TForm) Shift: TShiftState); procedure OpenBtnClick(Sender: TObject); procedure CreateBtnClick(Sender: TObject); + procedure CheckRemoteFilesToMove; private procedure LoadBackupPaths(FileName: string); { Private declarations } @@ -50,17 +51,20 @@ TMain = class(TForm) Main: TMain; Actions, ExcludePaths, ExcludeRenameFiles: TStringList; CurrentBackupFilePath: string; //Текущий файл путей Ð´Ð»Ñ Ñ€ÐµÐ·ÐµÑ€Ð²Ð½Ð¾Ð¹ копии - FilesCounter, ActionGoodCounter, GoodCopyFilesCounter, GoodRenameFilesCounter, GoodDeleteFilesCounter, GoodMakeFoldersCounter, GoodRemoveFoldersCounter, - BadCopyFilesCounter, BadRenameFilesCounter, BadDeleteFilesCounter, BadMakeFoldersCounter, BadRemoveFoldersCounter: integer; + + FilesCounter, ActionGoodCounter, GoodCopyFilesCounter, GoodMoveFilesCounter, GoodRenameFilesCounter, GoodDeleteFilesCounter, + GoodMakeFoldersCounter, GoodRemoveFoldersCounter, BadCopyFilesCounter, BadMoveFilesCounter, BadRenameFilesCounter, + BadDeleteFilesCounter, BadMakeFoldersCounter, BadRemoveFoldersCounter: integer; + StopRequest: boolean; SilentMode: boolean; NotificationApp: string; ID_LOOKING_CHANGES, ID_FILE_RENAMED, ID_FOUND_NEW_FILE, ID_FILE_UPDATED, ID_FOUND_OLD_FILE, - ID_COPY_FILE, ID_RENAME_FILE, ID_REMOVE_FILE, ID_CREATE_FOLDER, ID_REMOVE_FOLDER: string; + ID_COPY_FILE, ID_MOVE_FILE, ID_RENAME_FILE, ID_REMOVE_FILE, ID_CREATE_FOLDER, ID_REMOVE_FOLDER, ID_CHECK_MOVE_FILES: string; ID_COMPLETED, ID_COMPLETED_ERROR, ID_BACKUP_COMPLETED, ID_BACKUP_FAILED, ID_CHECK_FILES, ID_TOTAL_OPERATIONS, - ID_SUCCESS_COPY_FILES, ID_SUCCESS_RENAME_FILES, ID_SUCCESS_REMOVE_FILES, - ID_SUCCESS_CREATE_FOLDERS, ID_SUCCESS_REMOVE_FOLDERS, ID_FAIL_COPY_FILES, ID_FAIL_RENAME_FILES, + ID_SUCCESS_COPY_FILES, ID_SUCCESS_MOVE_FILES, ID_SUCCESS_RENAME_FILES, ID_SUCCESS_REMOVE_FILES, + ID_SUCCESS_CREATE_FOLDERS, ID_SUCCESS_REMOVE_FOLDERS, ID_FAIL_COPY_FILES, ID_FAIL_MOVE_FILES, ID_FAIL_RENAME_FILES, ID_FAIL_REMOVE_FILES, ID_FAIL_CREATE_FOLDERS, ID_FAIL_REMOVE_FOLDERS: string; ID_PERFORM_OPERATIONS, ID_ENTER_NAME_PARE_FOLDERS, ID_CHOOSE_LEFT_FOLDER, ID_CHOOSE_RIGHT_FOLDER, ID_CHOOSE_FOLDER_ERROR, ID_SUCCESS_NOTIFICATION_MESSAGE, @@ -224,6 +228,66 @@ procedure CheckRemoteFilesToRemove(LocalFolder, RemoteFolder: string); FindClose(RemoteFile); end; +//Сравнение двух файлов на ÑоотвеÑтвие, по дате и размеру +function CompareFileIdentity(FirstFilePath, SecondFilePath: string): boolean; +var + FirstFile, SecondFile: TSearchRec; +begin + Result:=false; + if FindFirst(FirstFilePath, faAnyFile, FirstFile) = 0 then begin + + if FindFirst(SecondFilePath, faAnyFile, SecondFile) = 0 then begin + + if (FirstFile.Time = SecondFile.Time) and (FirstFile.Size = SecondFile.Size) then + Result:=true; + + FindClose(SecondFile); + end; + + FindClose(FirstFile); + end; +end; + +procedure TMain.CheckRemoteFilesToMove; //ЕÑли файл был перемещён в другую папку, то перемещаем файл, а не удалÑем и копируем Ñнова +var + i, j: integer; + ActionStr, DeleteFilePath, FirstCopyFilePath, SecondCopyFilePath: string; +begin + if Actions.Count = 0 then Exit; + StatusText(ID_CHECK_MOVE_FILES); + + for i:=0 to Actions.Count -1 do + if Copy(Actions.Strings[i], 1, 7) = 'DELETE ' then begin + ActionStr:=Actions.Strings[i]; + Delete(ActionStr, 1, 7); + DeleteFilePath:=ActionStr; + + for j:=0 to Actions.Count - 1 do begin + if i = j then Continue; //ПропуÑкаем DELETE + + //Ищем копируемые файлы + if Copy(Actions.Strings[j], 1, 5) = 'COPY ' then begin + ActionStr:=Actions.Strings[j]; + Delete(ActionStr, 1, 5); + + FirstCopyFilePath:=Copy(ActionStr, 1, Pos(#9, ActionStr) - 1); + SecondCopyFilePath:=Copy(ActionStr, Pos(#9, ActionStr) + 1, Length(ActionStr)); + + //Проверка на ÑоответÑтвие файлов + if CompareFileIdentity(DeleteFilePath, FirstCopyFilePath) then begin + Actions.Strings[j]:='MOVE ' + DeleteFilePath + #9 + SecondCopyFilePath; + Actions.Strings[i]:='FIXED'; + Break; + end; + end; + + end; + end; + + //Убираем иÑправленные дейÑÑ‚Ð²Ð¸Ñ + Actions.Text:=StringReplace(Actions.Text, 'FIXED' + #13#10, '', [rfReplaceAll]); +end; + procedure ActionsRun; var i: integer; ActionStr: string; @@ -250,6 +314,21 @@ procedure ActionsRun; end; end; + if Copy(Actions.Strings[i], 1, 5) = 'MOVE ' then begin + Delete(ActionStr, 1, 5); + try + StatusText(ID_MOVE_FILE + ' ' + Copy(ActionStr, 1, Pos(#9, ActionStr) - 1)); + if MoveFile( PChar( Copy(ActionStr, 1, Pos(#9, ActionStr) - 1) ), + PChar( Copy(ActionStr, Pos(#9, ActionStr) + 1, Length(ActionStr)) ) ) then begin + Inc(GoodMoveFilesCounter); + Actions.Strings[i]:=''; + end else + Inc(BadMoveFilesCounter); + except + Inc(BadMoveFilesCounter); + end; + end; + if Copy(Actions.Strings[i], 1, 7) = 'RENAME ' then begin Delete(ActionStr, 1, 7); try @@ -366,10 +445,12 @@ procedure TMain.FormCreate(Sender: TObject); ID_FILE_UPDATED:=Ini.ReadString('Main', 'ID_FILE_UPDATED', ''); ID_FOUND_OLD_FILE:=Ini.ReadString('Main', 'ID_FOUND_OLD_FILE', ''); ID_COPY_FILE:=Ini.ReadString('Main', 'ID_COPY_FILE', ''); + ID_MOVE_FILE:=Ini.ReadString('Main', 'ID_MOVE_FILE', ''); ID_RENAME_FILE:=Ini.ReadString('Main', 'ID_RENAME_FILE', ''); ID_REMOVE_FILE:=Ini.ReadString('Main', 'ID_REMOVE_FILE', ''); ID_CREATE_FOLDER:=Ini.ReadString('Main', 'ID_CREATE_FOLDER', ''); ID_REMOVE_FOLDER:=Ini.ReadString('Main', 'ID_REMOVE_FOLDER', ''); + ID_CHECK_MOVE_FILES:=Ini.ReadString('Main', 'ID_CHECK_MOVE_FILES', ''); ID_COMPLETED:=Ini.ReadString('Main', 'ID_COMPLETED', ''); ID_COMPLETED_ERROR:=Ini.ReadString('Main', 'ID_COMPLETED_ERROR', ''); ID_BACKUP_COMPLETED:=Ini.ReadString('Main', 'ID_BACKUP_COMPLETED', ''); @@ -377,11 +458,13 @@ procedure TMain.FormCreate(Sender: TObject); ID_CHECK_FILES:=Ini.ReadString('Main', 'ID_CHECK_FILES', ''); ID_TOTAL_OPERATIONS:=Ini.ReadString('Main', 'ID_TOTAL_OPERATIONS', ''); ID_SUCCESS_COPY_FILES:=Ini.ReadString('Main', 'ID_SUCCESS_COPY_FILES', ''); + ID_SUCCESS_MOVE_FILES:=Ini.ReadString('Main', 'ID_SUCCESS_MOVE_FILES', ''); ID_SUCCESS_RENAME_FILES:=Ini.ReadString('Main', 'ID_SUCCESS_RENAME_FILES', ''); ID_SUCCESS_REMOVE_FILES:=Ini.ReadString('Main', 'ID_SUCCESS_REMOVE_FILES', ''); ID_SUCCESS_CREATE_FOLDERS:=Ini.ReadString('Main', 'ID_SUCCESS_CREATE_FOLDERS', ''); ID_SUCCESS_REMOVE_FOLDERS:=Ini.ReadString('Main', 'ID_SUCCESS_REMOVE_FOLDERS', ''); ID_FAIL_COPY_FILES:=Ini.ReadString('Main', 'ID_FAIL_COPY_FILES', ''); + ID_FAIL_MOVE_FILES:=Ini.ReadString('Main', 'ID_FAIL_MOVE_FILES', ''); ID_FAIL_RENAME_FILES:=Ini.ReadString('Main', 'ID_FAIL_RENAME_FILES', ''); ID_FAIL_REMOVE_FILES:=Ini.ReadString('Main', 'ID_FAIL_REMOVE_FILES', ''); ID_FAIL_CREATE_FOLDERS:=Ini.ReadString('Main', 'ID_FAIL_CREATE_FOLDERS', ''); @@ -438,6 +521,8 @@ procedure TMain.RunBtnClick(Sender: TObject); var i: integer; Item: TListItem; + + BackupStatusTitle: string; begin StopRequest:=false; ProgressBar.Position:=0; @@ -451,11 +536,13 @@ procedure TMain.RunBtnClick(Sender: TObject); FilesCounter:=0; ActionGoodCounter:=0; GoodCopyFilesCounter:=0; + GoodMoveFilesCounter:=0; GoodRenameFilesCounter:=0; GoodDeleteFilesCounter:=0; GoodMakeFoldersCounter:=0; GoodRemoveFoldersCounter:=0; BadCopyFilesCounter:=0; + BadMoveFilesCounter:=0; BadRenameFilesCounter:=0; BadDeleteFilesCounter:=0; BadMakeFoldersCounter:=0; @@ -470,6 +557,7 @@ procedure TMain.RunBtnClick(Sender: TObject); CheckRemoteFilesToRemove(Item.SubItems[1], Item.SubItems[2]); end; end; + CheckRemoteFilesToMove; if SilentMode = false then begin @@ -524,40 +612,30 @@ procedure TMain.RunBtnClick(Sender: TObject); if SilentMode = false then begin - if (BadCopyFilesCounter = 0) and (BadRenameFilesCounter = 0) and (BadDeleteFilesCounter = 0) and (BadRemoveFoldersCounter = 0) then - Application.MessageBox(PChar(ID_BACKUP_COMPLETED + #13#10 + #13#10 + - ID_CHECK_FILES + ' ' + IntToStr(FilesCounter) + #13#10 + - ID_TOTAL_OPERATIONS + ' ' + IntToStr(ActionGoodCounter) + #13#10 + - ID_SUCCESS_COPY_FILES + ' ' + IntToStr(GoodCopyFilesCounter) + #13#10 + - ID_SUCCESS_RENAME_FILES + ' ' + IntToStr(GoodRenameFilesCounter) + #13#10 + - ID_SUCCESS_REMOVE_FILES + ' ' + IntToStr(GoodDeleteFilesCounter) + #13#10 + - ID_SUCCESS_CREATE_FOLDERS + ' ' + IntToStr(GoodMakeFoldersCounter) + #13#10 + - ID_SUCCESS_REMOVE_FOLDERS + ' ' + IntToStr(GoodRemoveFoldersCounter) + #13#10 + - ID_FAIL_COPY_FILES + ' ' + IntToStr(BadCopyFilesCounter) + #13#10 + - ID_FAIL_RENAME_FILES + ' ' + IntToStr(BadRenameFilesCounter) + #13#10 + - ID_FAIL_REMOVE_FILES + ' ' + IntToStr(BadDeleteFilesCounter) + #13#10 + - ID_FAIL_CREATE_FOLDERS + ' ' + IntToStr(BadMakeFoldersCounter) + #13#10 + - ID_FAIL_REMOVE_FOLDERS + ' ' + IntToStr(BadRemoveFoldersCounter) ), - PChar(Caption), MB_ICONINFORMATION) + if (BadCopyFilesCounter = 0) and (BadMoveFilesCounter = 0) and (BadDeleteFilesCounter = 0) and (BadRenameFilesCounter = 0) and (BadRemoveFoldersCounter = 0) then + BackupStatusTitle:=ID_BACKUP_COMPLETED else - Application.MessageBox(PChar(ID_BACKUP_FAILED + #13#10 + #13#10 + - ID_CHECK_FILES + ' ' + IntToStr(FilesCounter) + #13#10 + - ID_TOTAL_OPERATIONS + ' ' + IntToStr(ActionGoodCounter) + #13#10 + - ID_SUCCESS_COPY_FILES + ' ' + IntToStr(GoodCopyFilesCounter) + #13#10 + - ID_SUCCESS_RENAME_FILES + ' ' + IntToStr(GoodRenameFilesCounter) + #13#10 + - ID_SUCCESS_REMOVE_FILES + ' ' + IntToStr(GoodDeleteFilesCounter) + #13#10 + - ID_SUCCESS_CREATE_FOLDERS + ' ' + IntToStr(GoodMakeFoldersCounter) + #13#10 + - ID_SUCCESS_REMOVE_FOLDERS + ' ' + IntToStr(GoodRemoveFoldersCounter) + #13#10 + - ID_FAIL_COPY_FILES + ' ' + IntToStr(BadCopyFilesCounter) + #13#10 + - ID_FAIL_RENAME_FILES + ' ' + IntToStr(BadRenameFilesCounter) + #13#10 + - ID_FAIL_REMOVE_FILES + ' ' + IntToStr(BadDeleteFilesCounter) + #13#10 + - ID_FAIL_CREATE_FOLDERS + ' ' + IntToStr(BadMakeFoldersCounter) + #13#10 + - ID_FAIL_REMOVE_FOLDERS + ' ' + IntToStr(BadRemoveFoldersCounter) ), - PChar(Caption), MB_ICONINFORMATION); + BackupStatusTitle:=ID_BACKUP_FAILED; + + Application.MessageBox(PChar(BackupStatusTitle + #13#10 + #13#10 + + ID_CHECK_FILES + ' ' + IntToStr(FilesCounter) + #13#10 + ID_TOTAL_OPERATIONS + ' ' + IntToStr(ActionGoodCounter) + #13#10#13#10 + + ID_SUCCESS_COPY_FILES + ' ' + IntToStr(GoodCopyFilesCounter) + #13#10 + + ID_SUCCESS_MOVE_FILES + ' ' + IntToStr(GoodMoveFilesCounter) + #13#10 + + ID_SUCCESS_RENAME_FILES + ' ' + IntToStr(GoodRenameFilesCounter) + #13#10 + + ID_SUCCESS_REMOVE_FILES + ' ' + IntToStr(GoodDeleteFilesCounter) + #13#10 + + ID_SUCCESS_CREATE_FOLDERS + ' ' + IntToStr(GoodMakeFoldersCounter) + #13#10 + + ID_SUCCESS_REMOVE_FOLDERS + ' ' + IntToStr(GoodRemoveFoldersCounter) + #13#10#13#10 + + ID_FAIL_COPY_FILES + ' ' + IntToStr(BadCopyFilesCounter) + #13#10 + + ID_FAIL_MOVE_FILES + ' ' + IntToStr(BadMoveFilesCounter) + #13#10 + + ID_FAIL_RENAME_FILES + ' ' + IntToStr(BadRenameFilesCounter) + #13#10 + + ID_FAIL_REMOVE_FILES + ' ' + IntToStr(BadDeleteFilesCounter) + #13#10 + + ID_FAIL_CREATE_FOLDERS + ' ' + IntToStr(BadMakeFoldersCounter) + #13#10 + + ID_FAIL_REMOVE_FOLDERS + ' ' + IntToStr(BadRemoveFoldersCounter) ), + PChar(Caption), MB_ICONINFORMATION); end else if Trim(NotificationApp) <> '' then begin - if (BadCopyFilesCounter = 0) and (BadRenameFilesCounter = 0) and (BadDeleteFilesCounter = 0) and (BadRemoveFoldersCounter = 0) then + if (BadCopyFilesCounter = 0) and (BadMoveFilesCounter = 0) and (BadDeleteFilesCounter = 0) and (BadRenameFilesCounter = 0) and (BadRemoveFoldersCounter = 0) then WinExec(PAnsiChar(NotificationApp + ' -t "' + Caption + '" -d "' + ID_SUCCESS_NOTIFICATION_MESSAGE + '" -b EchoBackaper.png -c 1'), SW_SHOWNORMAL) else WinExec(PAnsiChar(NotificationApp + ' -t "' + Caption + '" -d "' + ID_FAIL_NOTIFICATION_MESSAGE + '" -b EchoBackaper.png -c 1'), SW_SHOWNORMAL); @@ -752,8 +830,8 @@ procedure TMain.StopBtnClick(Sender: TObject); procedure TMain.AboutBtnClick(Sender: TObject); begin - Application.MessageBox(PChar(Caption + ' 0.5.8' + #13#10 + - ID_LAST_UPDATE + ' 02.01.2020' + #13#10 + + Application.MessageBox(PChar(Caption + ' 0.7' + #13#10 + + ID_LAST_UPDATE + ' 17.10.2020' + #13#10 + 'https://r57zone.github.io' + #13#10 + 'r57zone@gmail.com'), PChar(ID_ABOUT_TITLE), MB_ICONINFORMATION); end;