pDPSDocCopy
pDPSDocCopy
Copies the contents of one document (or file) to another document (or file).
Syntax
pDPSDocCopy ( in vlSourceDoc,
in vlSourceFile,
in vlTargetDoc,
in vlTargetFile )
Parameters
vlSourceDoc | The name of the source document. |
vlSourceFile | The file name of the source document. |
vlTargetDoc | The document name of the target document. |
vlTargetFile | The file name of the target document. |
Comments
The pDPSDocCopy command can be used to copy the contents of documents or files. The vlSourceDoc and vlTargetDoc parameters are either constants or expressions that evaluate to the names of existing documents. The names do not have to be qualified (i.e. “MyDoc” and “zim.MyDoc” are both acceptable).
If vlSourceDoc is neither blank nor $NULL, then the document name is looked up in the Object Dictionary to find the associated file name. If vlSourceDoc is not a qualified name, then the file name for the first document found in the Object Dictionary with the indicated document name is used. If vlSourceDoc is blank or $NULL, then vlSourceFile is used as the file name.
If vlTargetDoc is neither blank nor $NULL, then the document name is looked up in the Object Dictionary to find the associated file name. If vlTargetDoc is not a qualified name, then the file name for the first document found in the Object Dictionary with the indicated document name is used. If vlTargetDoc is blank or $NULL, then vlTargetFile is used as the file name.
If either vlSourceFile or vlTargetFile start with special file name characters (e.g. “)”, “#”, etc.) appropriate conversions are made.
The pDPSDocCopy command is compiled.
Example
To copy the contents of a document called MyDoc in directory zim to a file C:DATATMP.TXT (which do not have to correspond to a Zim document):
pDPSDocCopy (“zim.MyDoc”, “”, “”, “C:/DATA/TMP.TXT”)
Note: For reasons of portability and ease of use, use forward slashes (‘/’) in file names rather than backslashes (”). The forward slash is translated to a backslash on Windows systems.