unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  AHMSystemClass, AHMTFileOperator, StdCtrls, FileCtrl;

type
  TForm1 = class(TForm)
    FileListBox1: TFileListBox;
    DirectoryListBox1: TDirectoryListBox;
    DriveComboBox1: TDriveComboBox;
    Button1: TButton;
    AHMFileOperator1: TAHMFileOperator;
    procedure Button1Click(Sender: TObject);
    procedure AHMFileOperator1SuccessDelete(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var I : Integer;
begin
  with AHMFileOperator1 do
  begin
    for I:=0 to FileListbox1.Items.Count-1 do
      if FileListbox1.Selected[I] then FilesFrom.Add(FileListbox1.Items[i]);
    Execute;
  end;
end;

procedure TForm1.AHMFileOperator1SuccessDelete(Sender: TObject);
begin
  FileListbox1.Update;
  showmessage('All selected files have been successfully removed');
end;

end.
 