4D v12.4

COPY DOCUMENT

Home

 
4D v12.4
COPY DOCUMENT

 

COPY DOCUMENT 


 

COPY DOCUMENT ( sourceName ; destinationName {; *} ) 
Parameter Type   Description
sourceName  String in Name of document to be copied
destinationName  String in Name of copied document
in Override existing document if any

The COPY DOCUMENT command copies the document specified by sourceName to the location specified by destinationName.

Both sourceName and destinationName can be a name referring to a document located in the database folder or a pathname referring to a document in relation to the root level of a volume.

An error will occur if there is already a document named destinationName unless you specify the optional * parameter instructing COPY DOCUMENT to delete and override the destination document.

The following example duplicates a document in its own folder:

 COPY DOCUMENT("C:\\FOLDER\\DocName";"C:\\FOLDER\\DocName2")

The following example copies a document to the database folder (provided C:\\FOLDER is not the database folder):

 COPY DOCUMENT("C:\\FOLDER\\DocName";"DocName")

The following example copies a document from one volume to another one:

 COPY DOCUMENT("C:\\FOLDER\\DocName";"F:\\Archives\\DocName.OLD")

The following example duplicates a document in its own folder overriding an already existing copy:

 COPY DOCUMENT("C:\\FOLDER\\DocName";"C:\\FOLDER\\DocName2";*)

 
PROPERTIES 

Product: 4D
Theme: System Documents
Number: 541

The OK variable is changed by the commandThis command modifies the Error system variable

 
HISTORY 

Created: 4D v6

 
SEE ALSO 

MOVE DOCUMENT