File System Provider::CopyDirectory


Copies all files from a source directory to a destination directory. The recursive option includes subdirectories in the copy, and the replace option overwrites existing files. Used by Microsoft® Provisioning Framework (MPF).

XML Input Schema

The following code fragment shows the format for sending data to this procedure. For more information on individual elements and attributes, see the Elements and Attributes table.

<executeData>1..1
  <dirName>1..1</dirName>
  <newName>0..1</newName>
  <sourcePath path="..">1..1</sourcePath>
  <destPath path="..">1..1</destPath>
  <controlInfo replace=".." recursive="..">0..1</controlInfo>
</executeData>

XML Output Schema

CopyDirectory does not return data.

Elements and Attributes

The following table describes the XML elements and attributes. Unless otherwise indicated, the data type is string.

Element Description, relationships, and attributes
controlInfo Description:
Empty element with attributes that further refine the copy operation.

Parent:
executeData

Attributes:

recursive Optional. Enumeration ("true" or "false") that specifies whether to include subdirectories in the copy. The default value is "true".
replace Optional. Enumeration ("true" or "false") that specifies whether the copy overwrites existing files in the destination directory. The default value is "false".
destPath Description:
Path of the target directory for the copy operation.

Parent:
executeData

Attribute:

path Required. Path of the target directory (specified by the newName node).
dirName Description:
Source directory for the copy operation. Specify the source path using the sourcePath node.

Parent:
executeData

executeData Description:
Encapsulates the procedure's input data.

Children:
controlInfo (minOccurs="0" maxOccurs="1")
destPath (minOccurs="1" maxOccurs="1")
dirName
(minOccurs="1" maxOccurs="1")
newName (minOccurs="0" maxOccurs="1")
sourcePath (minOccurs="1" maxOccurs="1")

newName Description:
Target directory for the copy operation. Specify the target path using the destPath node.

Parent:
executeData

sourcePath Description:
Path of the directory to copy from.

Parent:
executeData

Attribute:

path Required. Path of the source directory (specified by the dirName node).

Remarks

The rollback procedure is DeleteDirectory.

See Also

CreateDirectory, DeleteDirectory, File System Provider, ListDirectory, MoveDirectory, RenameDirectory, SetDirectoryAttributes


Up Top of Page
© 1999-2002 Microsoft Corporation. All rights reserved.