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

Copies a file or folder.

Syntax
Pascal
class procedure Copy(const pFileName: IItemIdList; const pFolder: IItemIdList; pOptions: TOperationOptions = soDefault); overload; static;
Parameters 
Description 
const pFileName: IItemIdList 
The file or folder that should be copied.  
const pFolder: IItemIdList 
An existing folder where the specified file or folder should be copied.  
pOptions: TOperationOptions = soDefault 
Optional: The options to use.  
Exceptions 
Description 
if any passed ItemIdList is invalid.  

The following example shows how to copy a file:

  var
    File, Folder: IItemIdList;
  begin
    File := TJamItemIdList.Create('C:file.exe');
    Folder := TJamItemIdList.Create('D:');
    TJamFileOperation.Copy(File, Folder);
  end;