BMS-HOSxP Community

HOSxP => Delphi / Pascal => ข้อความที่เริ่มโดย: ittipol ที่ กุมภาพันธ์ 18, 2013, 09:44:51 AM

หัวข้อ: TSevenZip
เริ่มหัวข้อโดย: ittipol ที่ กุมภาพันธ์ 18, 2013, 09:44:51 AM
อาจารย์ครับ
TSevenZip คือ อะไรครับ
ขอคำแนะนำด้วยครับ
ขอบคุณครับ
หัวข้อ: Re: TSevenZip
เริ่มหัวข้อโดย: manoi ที่ กุมภาพันธ์ 19, 2013, 07:57:55 AM
ึ7Z ไงครับ เป็น Utility ที่บีบอัดข้อมูลครับ
หัวข้อ: Re: TSevenZip
เริ่มหัวข้อโดย: apisak ที่ กุมภาพันธ์ 19, 2013, 08:28:34 AM
ึ7Z ไงครับ เป็น Utility ที่บีบอัดข้อมูลครับ
อาจารย์ครับ ใช้คำสั่ง 7zip Command ตามนนี้ได้ใช่เปล่าครับ http://www.dotnetperls.com/7-zip-examples

cd:\7-zip\
7z e -so D:\hosxp.7z | D:\mysql\bin\mysql -u root -pxxx db_hosxp 
สามารถใช้งานแบบนี้ใช่เปล่าครับ
รบกวนอาจารย์แสดงตัวอย่าง event on คลิก ให้ดูได้เปล่าครับ
หัวข้อ: Re: TSevenZip
เริ่มหัวข้อโดย: ittipol ที่ กุมภาพันธ์ 27, 2013, 15:07:48 PM
TSevenZip
หาได้จากไหนครับแนะนำหน่อยครับ
หัวข้อ: Re: TSevenZip
เริ่มหัวข้อโดย: ittipol ที่ กุมภาพันธ์ 27, 2013, 15:54:07 PM
อาจารย์ครับช่วยแนะนำการติดตั้ง
SevenZipVCL บน delphi xe
หน่อยครับ ขอบคุณครับ
หัวข้อ: Re: TSevenZip
เริ่มหัวข้อโดย: apisak ที่ มีนาคม 04, 2013, 10:10:06 AM
อาจารย์ครับ
TSevenZip คือ อะไรครับ
ขอคำแนะนำด้วยครับ
ขอบคุณครับ
ไม่ทราบว่าใช่เปล่านะครับ ให้ลองดูครับ
http://www.componentace.com/extract-file-from-zip-in-delphi.htm
//zip file
      begin
      //
          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;
//unzip
begin
            begin
              // Create an instance of the TZipForge class
              archiver := TZipForge.Create(nil);
              try
              with archiver do
                        begin
                          // The name of the ZIP file to unzip
                          FileName := 'C:\test.zip';
                          // Open an existing archive
                          OpenArchive(fmOpenRead);
                          // Set base (default) directory for all archive operations
                          BaseDir := 'C:\temp';
                          // Extract all files from the archive to C:\Temp folder
                          ExtractFiles('*.*');
                          CloseArchive();
                        end;
              except
              on E: Exception do
                        begin
                          Writeln('Exception: ', E.Message);
                          // Wait for the key to be pressed
                          Readln;
                        end;
              end;
    end;
end;