Tuesday, October 1, 2013

Set SharePoint Library Column Value from Document File Name

Requirement:
In a SharePoint 2007 site, We've a document library with 1000+ documents loaded. We got a requirement to add two new fields "Year" and "Quarter " and update those meta data field values from the document name.

Here is the screenshot of the list:

Solution:
PowerShell script! We analyzed that the Year & Quarter values are separated by "__". So, Lets write a PowerShell script to extract the required data from document name and set the columns programmatically.