//ZipForge bileşeni ücretsiz bir dosya sıkıştırma bileşenidir.
//İstediğiniz dosyaları zip formatı ile yedekleyebilirsiniz
//formunuza Zipforge ve uses kısmına shellapi ekleyin
procedure TForm1.dxNavBar1Item6Click(Sender: TObject);
var
archiver : TZipForge;
var
tarih:string;
begin
// Create an instance of the TZipForge class
archiver := TZipForge.Create(nil);
tarih:=FormatDatetime('dd_mm_yyyy_hh_mm_ss',now);
if not DirectoryExists(ExtractFilePath(Application.ExeName)+'Yedek') then
begin
Application.MessageBox('Yedek Klasörü Bulunamadı'+#13+'Programın kurulu olduğu
klasör altına Yedek klasörü açın',
'Veritabanı yedekleme',
MB_OK+
MB_ICONERROR+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
end
else
begin
try
with archiver do
begin
// Set the name of the archive file we want to create
FileName := ExtractFilePath(Application.ExeName)+'Yedek'+tarih+'.zip';
// Because we create a new archive,
// we set Mode to fmCreate
OpenArchive(fmCreate);
// Set base (default) directory for all archive operations
BaseDir := ExtractFilePath(Application.ExeName)+'DB';
// Add file C: est.txt the archive; wildcards can be used as well
AddFiles('DB.mdb');
CloseArchive();
Application.MessageBox('Yedekleme işlemi tamamlandı',
'Veritabanı yedekleme',
MB_OK+
MB_ICONEXCLAMATION+
MB_DEFBUTTON1+
MB_SYSTEMMODAL);
ShellExecute(Application.Handle, nil,
Pchar(ExtractFilePath(Application.ExeName)+'Yedek'), nil,nil,
SW_SHOWNOACTIVATE);
end;
except
on E: Exception do
begin
Writeln('Exception: ', E.Message);
// Wait for the key to be pressed
Readln;
end;
end;
end;
end;
__________________
SusKun ve Sessiz Mürekkep...
Kullanıcı imzalarındaki bağlantı ve resimleri görebilmek için en az 20 mesaja sahip olmanız gerekir ya da üye girişi yapmanız gerekir.