Metadata file structure


The following section gives you the guidelines to create an external metadata file for Import folders, files and metadata to SharePoint Libraries (Explorer Mode) and Import folders, files and metadata to SharePoint Libraries (Batch File Mode) task type.

The first row of the metadata file is reserved for the headers and should contain the field names as headers. In an import task, data type of the columns must be the same across all libraries. SharePoint columns that are read-only will not be updated by Dockit.

The one of the fields (headers) in the metadata file should be named as 'Path', as 'Path' is reserved header to lookup the path of the document whose metadata to be updated. The delimiter character used  to separate the headers in the external metadata file should be same as 'Format' string value available in the registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4\Engines\Text). The comonly used separator is comma (,).

The following table shows the equivalent Format string for 'List Separator' in the registry key:

List Separator

Equivalent Format String

, (comma)

CSVDelimited

; (semi-colon)

Delimited(;)

* (asterisk)

Delimited(*)

Be consistent with the drive letters and UNC path when adding folders and file into SharePoint library using Dockit user interface and the path field values in the metadata file. If you use local / mapped drives to import files, ensure the 'Path' field has the corresponding local / mapped drive path (e.g., M:\MyDocs\File1.xlsx). If you use shares to import file, ensure the 'Path' field has the corresponding UNC path (e.g., \\Machine_Name\Share_Name\Sample File1.xlsx).

You can also use wildcard notations in order to assign the same or different metadata for the folders, sub-folders & files. Please see the wildcard usage below:

Wildcard characters

Example

Description

*.*

D:\My Documents\folder1\*.*

Assigns same metadata as the parent folder ‘folder1’ for all files and sub-folders.

*

D:\My Documents\folder2\*

Assigns same metadata as the parent folder ‘folder2’ for all its sub-folders.

.*

D:\My Documents\folder3\.*

Assigns same metadata as the parent folder ‘folder3’ for all files in the parent folder and its sub-folders.

For CSV and TXT formats, all field names and their corresponding metadata values should be enclosed within double quotes (“ ”) e.g., “John Doe”. When using accented characters such as [á é í ó] in folder / file names, the CSV / TXT metadata file must be in UNICODE encoded format.


The following section describes the data types supported by SharePoint and an example of how to state the value in the metadata file for import.

SharePoint Data Type

Remarks

Example

Yes/No

If any other value appears in the metadata file, other than Yes/No, default value will be assigned.

"Yes"
"No"

Text

The text length should not exceed 255 characters.

"This is sample text"

Multi-line Text

The text length should not exceed 255 characters (preferred).

"This is sample text\nThis is sample for multi-line text"

Date and Time

Date or Date & Time can be given in this field. Dockit provides an user option to specify the date mask to use for the date fields in metadata file in the task setup wizard.

"12/30/2009 10:50 AM"
"1/25/2010"

Number

The fixed or floating number can be given to this field. The value should not exceed the numeric boundary.

"10"
"3.41"

Currency

The fixed or floating number can be given to this field. Do not use any currency symbol ($) with this field value. The value should not exceed the currency boundary.

"100"
"10000"
"1500.67"

Choice (Single value)

Text or Number value can be given to this field. Do not use multiple values unless defined in SharePoint to accept multiple values.

"Male"
"15"

Choice (Multiple values)

Text or Number values can be given to this field. The values can be of single or multiple. Multiple values should be separated with ';'.

"Windows 7;Windows Vista;Windows 2003;Windows XP"

Lookup (Single value)

Text or Number value can be given to this field. Do not use multiple values unless defined in SharePoint to accept multiple values.

In this case, you must specify the column value in the metadata file. Dockit will search for the value in the corresponding column of the referenced list and assign the ID of the first item matching the column value to the lookup column of the imported file, only if the column value exists.

Note: If the specified column value is of folder type, the ID of the folder will not be assigned.

"Windows 7"

Lookup (Multiple values)

Text or Number values can be given to this field. The values can be of single or multiple. Multiple values should be separated with ';'.

In this case, you must specify the column value in the metadata file. Dockit will search for the value in the corresponding column of the referenced list and assign the ID of the first item matching the column value to the lookup column of the imported file, only if the column value exists.

Note: If the specified column value is of folder type, the ID of the folder will not be assigned.

"Stock Details;Accounts;Product Details"

People or Group (Single Value)

User name, AD Group name or SharePoint Group name can be given to this field. The user Login Name (domain\username), Display Name (John Doe) or E-mail address (someone@example.com) can be used to denote a user account.

Do not use multiple values unless the equivalent column defined in SharePoint can accept multiple values.

Dockit will search for the value in the site users list and assign the ID of the matching the user or group name to the People or Group column of the imported file, only if the user or group name exists.

"VOYAGER\Administrator"
"BUILTIN\Administrator"
"Backup Owners"
"someone@example.com"
"John Doe"

People or Group (Multiple value)

User name, AD Group name or SharePoint Group name can be given to this field. The user Login Name (domain\username), Display Name (John Doe) or E-mail address (someone@example.com) can be used to denote a user account.

The values can be of single or multiple. Multiple values should be separated with ';'.

Dockit will search for the value in the site users list and assign the ID of the matching the user or group name to the People or Group column of the imported file, only if the user or group name exists.

"VOYAGER\User1; BUILTIN\Administrators;Guest Members;Temps"

Hyperlink or Picture

The http URL of any resource or picture can be given to this field. 

"http://sharepoint/Shared Documents/My Sample File.doc"
"http://sharepoint/Pictures/chart.bmp"

Target Audiences (Multiple value)

(Applicable only for a MOSS / Microsoft SharePoint Server 2010 and above library)

Global Audience name, Security / Distribution Group name and SharePoint Group name can be given to this field. Global Audience and Security / Distribution Group should be crawled and stored in User Profile Store of SSP / Services.

The values can be of single or multiple. Multiple values should be separated with ';'.

Dockit will search for the value in the respective group list and assign the ID of the matching group name to the Target Audiences column of the imported file, only if the group name exists. Moreover, in order to assign the values that belong either to Global Audience or Security / Distribution Group require Dockit Server Agent component to be installed in the destination SharePoint server (MOSS / Microsoft SharePoint Server 2010 and above).

"All site users; Admins; Viewers; Administrators; SPUsers; Contributors; Designers

Publishing Schedule Start Date

(Applicable only for Collaboration Portal /  Publishing Portal Site)

Date or Date & Time can be given in this field. Dockit provides an user option to specify the date mask to use for the date fields in metadata file in the task setup wizard.

"12/30/2010 10:50 AM"
"1/25/2009"

Publishing Schedule End Date

(Applicable only for Collaboration Portal /  Publishing Portal Site)

Date or Date & Time can be given in this field. Dockit provides an user option to specify the date mask to use for the date fields in metadata file in the task setup wizard.

"12/30/2009 10:50 AM"
"1/25/2010"

Publishing Image

(Applicable only for Collaboration Portal /  Publishing Portal Site)

The http URL of any picture can be given to this field. Relative URL also can be given to this field. 

"http://sharepoint/Pictures/chart.bmp"

"Pictures/chart.bmp"

<img src='/sites/collaboration portal/PublishingImages/NewsArticleImage.jpg' />

Publishing Hyperlink

(Applicable only for Collaboration Portal /  Publishing Portal Site)

The http URL of any resource can be given to this field. Relative URL also can be given to this field.

"http://sharepoint/Documents/Sample File.doc"

"/Documents/Sample File.doc"

"<a href='/sites/collaboration portal/PublishingImages/NewsArticleImage.jpg'> NewsArticleImage.jpg</a>"

Publishing HTML

(Applicable only for Collaboration Portal /  Publishing Portal Site)

HTML content can be given in this field. You can use HTML tags in order to create rich content in the field.

It is <b>sample text</b>

Business Data (BDC) / External Data (BCS)

(Applicable only for SharePoint Enterprise Edition)

The BDC / BCS column value along with the filter name can be specified in this field. Dockit will search for the specified column value in the LOB entity using the given filter and assign the corresponding ID (when the BDC / BCS column value match is found) of the LOB record to the BDC / BCS column in SharePoint. Specify this value in filter name: value format. If the filter name contains colon (:) in its name, specify this value in FILTER:filter name, QUERY:value, where FILTER and QUERY are reserved words.

Dockit also automatically fills-up the column values associated with the BDC / BCS column during import.

"Company Name:Vyapin"
"ID:1000"
"Product Name:Dockit Migrator for SharePoint"

If the filter name contains colon (:) in its name, use the following syntax:

"FILTER:Product:Product ID,QUERY:Dockit"
"FILTER:ID:Name,QUERY:1000AX"

Managed Metadata (Single Value)

Text or Number value can be given to this field. Do not use multiple values unless defined in SharePoint to accept multiple values.

In this case, you must specify the term label or synonyms of the term label or column value with full term path in the metadata file. Dockit will search the specified value from the term set selected for the corresponding managed metadata column and assign the ID of the matching term value to the managed metadata column of the imported file, only if the column value exists. The term path should be separated with '|'.

Note: If the specified column value is unavailable in the term store, Dockit checks if the term set is open to creating new terms. If yes, Dockit creates the new terms under the term path specified in the metadata file. Otherwise, the specified term will not be assigned for the specific file / folder.

If you specify the term label in the metadata file, Dockit will search the specified term value and assign the first matching term value for the corresponding managed metadata column.

"Continent|North America|Country|United States|States|Alaska"

"Alaska"

Managed Metadata (Multiple Values)

Text or Number values can be given to this field. The values can be of single or multiple. Multiple values should be separated with ';'.

In this case, you must specify the term label or synonyms of the term label or column value with full term path in the metadata file. Dockit will search the specified value from the term set selected for the corresponding managed metadata column and assign the ID of the matching term value to the managed metadata column of the imported file, only if the column value exists. The term path should be separated with '|'.

Note: If the specified column value is unavailable in the term store, Dockit checks if the term set is open to creating new terms. If yes, Dockit creates the new terms under the term path specified in the metadata file. Otherwise, the specified term will not be assigned for the specific file / folder.

If you specify the term label in the metadata file, Dockit will search the specified term value and assign the first matching term value for the corresponding managed metadata column.

"Continent|North America|Country|United States|States|Washington;Continent
|North America|Country|United States|
States|California;Continent
|North America|Country|United States|
States|Alaska"

"Washington;California;Alaska"

Geolocation

Location co-ordinates or name can be given to this field. The co-ordinates value must have latitude and longitude values separated by ':'. The latitude value must be between -90 and +90 and longitude value must be between -180 and +180.

"30:-60"
"New York, United States"

Task Outcome

Text or Numeric value can be given to this field. Do not use multiple values for this column type.

"Complete"
"4"

Related Items

The http absolute URL of any list item (including file) within the site collection can be given to this field.  The values can be of single or multiple. Multiple values should be separated by ';'.

"http://sharepoint/Documents/Sample 1.doc; http://sharepoint/Documents/Sample 2.xlsx" "http://sharepoint/Lists/Custom List/1_.000"

 

The following tables below describe the syntax to be used in the external metadata file for single values / multi values for the following data types in SharePoint:

  • Choice*
  • Lookup
  • Person or Group 

Single Value

Example

Final Result

In case single value contains ';' as part of its value, you can separate the values using ';#'.

";#Windows Live Spaces; Mesh;#"

Windows Live Spaces; Mesh

In case single value contains ';#' as part of its value, escape these characters by preceding them with a semicolon and separate the values using ';#'.

* - The delimiter ';#' is a reserved character pattern in the Choice field column. The single value should not contain ';#' as part of its value to be assigned to the Choice field column in SharePoint.

";#Windows Live;;#Mail;#"

Windows Live;#Mail

Multi-Value

Example

Final Result

In case multi-value contain ';' as part of its value, you can separate the values using ';#'.

";#Windows Live Spaces; Mesh;#Windows Azure;#Windows HPC;#"

Windows Live Spaces; Mesh; Windows Azure; Windows HPC

In case multi-value contain ';#' as part of its value, escape these characters by preceding them with a semicolon and separate the values using ';#'.

* - The delimiter ';#' is a reserved character pattern in the Choice field column. The multi-value should not contain ';#' as part of its value to be assigned to the Choice field column in SharePoint.

";#Windows Live;;#Mail;#Windows Photo Gallery;#"

Windows Live;#Mail; Windows Photo Gallery

 

Sample format of a CSV / TEXT metadata file:

Note: Refer Point #2 for the separator to be used in the metadata file

Path”,”Modified Date”,”Author Name","Designation","Department"
“C:\My Documents\Sample Brochure.doc”,”11/06/2006”,”John Doe”,”Director”,”Senior Management"
“C:\My Sales\Sample Sales Template.xlsx”,”11/24/2006”,”Jane Doe”,”VP Sales”,”Corporate Sales"
“C:\My Sales\Sample Product Demo.ppt”,”09/09/1999”,”David Blake”,”Sales Manager”,”Consumer Sales”