Mass File Upload (file name parse for column data)

Copper Contributor

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 our new Sharepoint server (well over a few thousand files). I don't want to have to go file by file and assign each of the columns with each upload. Currently most of the data for each of the columns is conveniently stored in the File Name, so I'm looking for a way to make a workflow parse through each file and grab the details for each column. I have only come across a "Copy substring from Index X to Index Y", which in my case won't work since the character length of each value will vary from file to file. Is there another way to possibly parse through each of the files as they are uploaded to the Sharepoint site?

 

I've included an example of how the filename is formatted. The delimiting value that we're able to use to get most of the data is "-"..

FUNDSMULTI-ENTITY DOCUMENTS-2015-10-31-15 ETF FORMS-2016-08-16

 

Thanks in advance for any help/suggestions!

2 Replies

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.

 

 

As @Matt Weston said, you can certainly use PowerShell for this.

 

Since you say you're relatively new to SharePoint, you might want to consider a purpose-built SharePoint migration tool. Microsoft makes a free one for migrating to SharePoint Online.

 

For migrating to SharePoint Server, I would look at ShareGate. Best bang for your buck and easy to use interface. 

 

@Benjamin Niaulin from ShareGate and others might be on here if you want to message them.