ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Dialogs.FileOperation.TJamFileOperation.Copy

Copies files or folders.

Syntax
Pascal
class procedure Copy(const pFileNames: IItemIdListCollection; const pFolder: IItemIdList; pOptions: TOperationOptions = soDefault); overload; static;
Parameters 
Description 
const pFileNames: IItemIdListCollection 
The files or folders that should be copied.  
const pFolder: IItemIdList 
An existing folder where the specified files or folders should be copied.  
pOptions: TOperationOptions = soDefault 
Optional: The options to use.  
Exceptions 
Description 
if pFileNames contains no valid ItemIdList or pFolder is invalid.  

The following example shows how to copy multiple files:

  var
    Files: IItemIdListCollection;
    Folder: IItemIdList;
  begin
    Files := TItemIdListCollection.Create;
    Files.Add('C:file1.exe');
    Files.Add('C:file2.exe');
    Folder := TJamItemIdList.Create('D:');
    TJamFileOperation.Copy(Files, Folder);
  end;