1 (edited by prahousefamily 2016-05-25 07:06:53)

Topic: DecompressFiles How to Use

Function DecompressFiles(const ZlibFilename,DestDirectory : String )
How To Use ?

I can use function compressfile but  DecompressFiles can not use Help me please !

Post's attachments

Attachment icon Framework.zip 337.87 kb, 372 downloads since 2016-05-25 

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: DecompressFiles How to Use

Fixed:

Post's attachments

Attachment icon Framework_fixed.zip 18.39 kb, 462 downloads since 2016-05-25 

Dmitry.

Re: DecompressFiles How to Use

Thank You Very much Dmitry.
It Easy And Can apply more function ... Thank you again

var
    AppPath: string;



procedure Form1_Button7_OnClick (Sender: string; var Cancel: boolean);
var
    OpenDialog: TOpenDialog;
begin
    OpenDialog := TOpenDialog.Create(Form1);
    OpenDialog.InitialDir := AppPath+'DatabaseUserBackup\';
    if OpenDialog.Execute then
    begin

        DecompressFiles(OpenDialog.FileName, AppPath+'DatabaseUserRestore\');
        OpenFile(AppPath+'DatabaseUserRestore\');
    end;
    OpenDialog.Free;
end;

procedure Form1_Button6_OnClick (Sender: string; var Cancel: boolean);
begin
    CreateDir(AppPath+'DatabaseUserBackup') ;
    CopyFile(AppPath+'sqlite.db', AppPath+'DatabaseUserBackup/' + 'sqlite.db');
    CompressFile(AppPath+'DatabaseUserBackup\sqlite.db', AppPath+'DatabaseUserBackup\sqlite.db'+' '+FormatDateTime('yyyy-mm-dd hh-nn-ss', now)+'.Zlib');
    DeleteFile(AppPath+'DatabaseUserBackup\sqlite.db');
//form1.Memo1.Text := GetFilesList('DatabaseUserBackup/','*.*');
//form1.Memo1.ScrollBars := ssBoth;
    ShowMessage('OK Backup Clear! File is "'+ 'sqlite.db'+' '+FormatDateTime('yyyy-mm-dd hh-nn-ss', now)+'.Zlib"') ;
end;

procedure Form1_OnShow (Sender: string; Action: string);
begin
    Form1.mniAbout.Visible   := True;
    Form1.mniOptions.Visible := True;
    Form1.mniFile.Visible    := True;
end;

begin
    AppPath := ExtractFilePath(Application.ExeName)
end.
My Visual Database : I Love You
Easy For Beginner Student For Me