Forum Discussion
mdahlstrom_87
Feb 11, 2019Copper Contributor
Mass File Upload (file name parse for column data)
I'm hoping this is the right place to ask this kind of question, I'm fairly new to Sharepoint.. I have a very large number of files that I am working on migrating from an existing file server to ...
Matt Weston
Feb 12, 2019Iron Contributor
Hi mdahlstrom_87 , what type of workflow are you using to process these files at the moment?
As soon as you mentioned file server, I would immediately reach for PowerShell to do the parsing. There are tools out there that will do file system migration for you, but you'll probably still end up doing some PowerShell scripting to break apart your filename in order to set the metadata column.
Effectively you could do something like this:
$filename = "FUNDSMULTI-ENTITY DOCUMENTS-2015-10-31-15 ETF FORMS-2016-08-16.docx"
$arymetadata = $filename.split('-')
$field1 = $arymetadata[0] #FUNDSMULTI
$field2 = $arymetadata[1] #ENTITY DOCUMENTS
You can then upload your file and set the relevant metadata, and also change the filename at that point if you wanted to.