Hide Table of Contents
CopyFile Method (IEdmFolder5)

Obsolete. Superseded by IEdmFolder8::CopyFile2.

Syntax

Visual Basic (Declaration) 
Function CopyFile( _
   ByVal lFileID As System.Integer, _
   ByVal lSrcFolderID As System.Integer, _
   ByVal lParentWnd As System.Integer, _
   Optional ByVal bsNewName As System.String, _
   Optional ByVal lFlags As System.Integer _
) As System.Integer
C# 
System.int CopyFile( 
   System.int lFileID,
   System.int lSrcFolderID,
   System.int lParentWnd,
   System.string bsNewName,
   System.int lFlags
)
C++/CLI 
System.int CopyFile( 
&   System.int lFileID,
&   System.int lSrcFolderID,
&   System.int lParentWnd,
&   System.String^ bsNewName,
&   System.int lFlags
) 

Parameters

lFileID
ID of file to copy
lSrcFolderID
ID of folder from which to copy the file
lParentWnd
Parent window handle
bsNewName
Optional new name of the file; "" to use the original file name
lFlags
Combination of EdmCopyFlag bits

Return Value

ID of the new file

Example

Remarks

This method uses the ID of a file to identify which file to copy. You can also call IEdmFolder5::AddFile, specifying the path of the file that you want to copy. IEdmFolder5::AddFile handles both source files that are inside and outside of the vault.

Return codes:

  • S_OK: The method successfully executed.
  • E_EDM_NAME_ALREADY_EXISTS: There is already a file or folder with the same name in this folder.
  • E_EDM_FILE_NOT_FOUND: The source file was not found. (The ID is invalid.)
  • E_EDM_PERMISSION_DENIED: The user lacks permission to copy the specified file.
  • E_EDM_FILE_SHARE_ERROR: Cannot copy the file because it is exclusively opened in another application.
  • E_EDM_OPERATION_REFUSED_BY_PLUGIN: One of the installed EdmCmdData.EdmCmd_PreCopy hooks didn't permit the operation.
 

See Also

Availability

SOLIDWORKS PDM Professional Version 5.2


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   CopyFile Method (IEdmFolder5)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2018 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.