06-09-2014, 02:05 PM
PHP كود :
program ZipFolder; {$APPTYPE CONSOLE} uses // Add a ZipForge unit to the program SysUtils, ZipForge, Classes; var archiver : TZipForge; begin // Create an instance of the TZipForge class archiver := TZipForge.Create(nil); try with archiver do begin // Set the name of the archive file we want to create FileName := 'C:\test.zip'; // Because we create a new archive, // we set Mode to fmCreate OpenArchive(fmCreate); // Set base (default) directory for all archive operations BaseDir := 'C:\'; // Add the c:\Test folder to the archive with all subfolders AddFiles('C:\Test\*.*'); CloseArchive(); end; except on E: Exception do begin Writeln('Exception: ', E.Message); // Wait for the key to be pressed Readln; end; end; end.
كود :
http://www.componentace.com/zip_component_zip_delphi_zipforge.htm

![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)