File System Provider::RenameFile


Renames the specified file. 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
  <currentName>1..1</currentName>
  <newName>1..1</newName>
  <sourcePath path="..">1..1</sourcePath>
  <controlInfo replace="..">0..1</controlInfo>
</executeData>

XML Output Schema

RenameFile 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:
Contains the replace attribute.

Parent:
executeData

Attribute:

replace Optional. Enumeration ("true" or "false") that specifies whether the rename overwrites an existing file of the same name in the destination directory. The default value is "false".
currentName Description:
Original file name.

Parent:
executeData

executeData Description:
Encapsulates the procedure's input data.

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

newName Description:
New file name.

Parent:
executeData

Attribute:

path Required. Path of the source directory.
sourcePath Description:
File system location of the file to rename.

Parent:
executeData

Attribute:

path Required. File location.

Remarks

Rollback restores the file's original name.

See Also

CopyFile, DeleteFile, File System Provider, GetFileAttributes, MoveFile, RenameFile


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