Re: File Compression

Posted by Jenny on April 04, 2005

In Reply to: File Compression posted by Tomas

: Hi, can someone help me with some example using file compression in Delphi?
: I have a TXT file as input and I want to create a "ZIPPED" file as output.
: Can you write this procedure? I'm begginer in Delphi programming.

Much too complicated... better use a ZIP-component, or use external application:

procedure TForm1.Button1Click(Sender: TObject);
  Zipper = 'c:\program files\winzip\winzip32.exe';
  Source, Destination, Params: string;
  Source := 'c:\test1\*.*';
  Destination := 'c:\test2\';
  Params := '-a ' + Destination + ' ' + Source;
  ShellExecute(Handle, 'Open', PChar(Zipper), PChar(Params), nil, SW_NORMAL);

Related Articles and Replies


Delphi Forum :: Tutorials :: Source code :: Tips