// Prompt the user to specify a file to copy to the current folder procedure TfrmMain.btnCopyToDeviceClick(Sender: TObject); begin // No active folder (or root) if IEPortableDevices.ActiveFolderID = '' then exit;
// Prompt for a file to copy if OpenDialog1.Execute = False then exit;
// Copy to folder on device if IEPortableDevices.CopyFileToDevice( IEPortableDevices.ActiveDeviceID, IEPortableDevices.ActiveFolderID, OpenDialog1.FileName) then ShowMessage( 'File successfully copied to device' ) else ShowMessage( 'Failed to copy file to device!' ); end;