This topic has not yet been rated Rate this topic

MapFile Element (Feature)

SharePoint 2010

Published: May 2010

Specifies a mapping between files during a Feature upgrade.


<MapFile 
  FromPath = string
  ToPath = string />

Attribute

Description

FromPath

Optional string. Specifies the source file.

ToPath

Optional string. Specifies the destination file.

Minimum: 0

Maximum: Unbounded

Date

Description

Reason

May 2010

Initial publication

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
This element is mis-understood...
... and poorly documented. It will not actually carry out a move as assumed by the Thomas/Jeremy but is used to map a location that a file had prior to a feature upgrade to the file post the upgrade (in case the file location has changed, think renaming of a feature) to ensure that documents and pages ghosted in the database can still find the file on the FE file system...
Not working in RTM
This feature is not working in SharePoint Server 2010 RTM at all. Tried all different scenarios here.

Moving file:
<MapFile FromPath="StyleSheet\Sample.txt" ToPath="SPDevWiki\Sample.txt" />

Just renaming file

<MapFile FromPath="StyleSheet\Sample.txt" ToPath="StyleSheet\Sample1.txt" />

Doesn't throw an error, but leaves file where it is.