Files Delphi

uses
clipbrd, shellapi;
procedure TForm1.Button1Click(Sender: TObject) ;
var
f: THandle;
buffer: Array [0..MAX_PATH] of Char;
i, numFiles: Integer;
begin
Clipboard.Open;
try
f:= Clipboard.GetAsHandle( CF_HDROP ) ;
If f <> 0 Then Begin
numFiles := DragQueryFile( f, $FFFFFFFF, nil, 0 ) ;
memo1.Clear;
for i:= 0 to numfiles - 1 do begin
buffer[0] := #0;
DragQueryFile( f, i, buffer, sizeof(buffer)) ;
memo1.lines.add( buffer ) ;
end;
end;
finally
Clipboard.close;
end;
end;