ShellBrowser Delphi Components Documentation
ContentsIndexHome
Example

The following example shows a message when files were dropped in the TJamShellList, indicating if the files were moved or copied and showing their filenames with full path. If a file has been renamed by the user inside the TJamShellList, a message with the old and the new filename is shown.

procedure TMainForm.ShellListViewOperation(Sender: TObject; Operation: TJamShellOperations; Files: TFilenames; Destination: Widestring);
var s: Widestring;
i: Integer;
begin
if sopDrop in Operation then
begin
if sopCopy in Operation then
s := 'The following files have been copied to ';
if sopMove in Operation then
s := 'The following files have been moved to ';
s := s + Destination+#10#13;//linefeed
for i:=0 to Files.Count-1 do
s:=s+Files[i]+#10#13;
end;
if sopRename in Operation then
s := 'File ' + Files[0] + ' has been renamed to ' + ExtractFileName(Destination);
if Length(s)>0 then ShowMessage(s);
end;