Mass File Upload (file name parse for column data)

%3CLINGO-SUB%20id%3D%22lingo-sub-334696%22%20slang%3D%22en-US%22%3EMass%20File%20Upload%20(file%20name%20parse%20for%20column%20data)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-334696%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20hoping%20this%20is%20the%20right%20place%20to%20ask%20this%20kind%20of%20question%2C%20I'm%20fairly%20new%20to%20Sharepoint..%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20very%20large%20number%20of%20files%20that%20I%20am%20working%20on%20migrating%20from%20an%20existing%20file%20server%20to%20our%20new%20Sharepoint%20server%20(well%20over%20a%20few%20thousand%20files).%20I%20don't%20want%20to%20have%20to%20go%20file%20by%20file%20and%20assign%20each%20of%20the%20columns%20with%20each%20upload.%20Currently%20most%20of%20the%20data%20for%20each%20of%20the%20columns%20is%20conveniently%20stored%20in%20the%20File%20Name%2C%20so%20I'm%20looking%20for%20a%20way%20to%20make%20a%20workflow%20parse%20through%20each%20file%20and%20grab%20the%20details%20for%20each%20column.%20I%20have%20only%20come%20across%20a%20%22Copy%20substring%20from%20%3CSTRONG%3EIndex%20X%3C%2FSTRONG%3E%20to%26nbsp%3B%3CSTRONG%3EIndex%20Y%3C%2FSTRONG%3E%22%2C%20which%20in%20my%20case%20won't%20work%20since%20the%20character%20length%20of%20each%20value%20will%20vary%20from%20file%20to%20file.%20Is%20there%20another%20way%20to%20possibly%20parse%20through%20each%20of%20the%20files%20as%20they%20are%20uploaded%20to%20the%20Sharepoint%20site%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20included%20an%20example%20of%20how%20the%20filename%20is%20formatted.%20The%20delimiting%20value%20that%20we're%20able%20to%20use%20to%20get%20most%20of%20the%20data%20is%20%22%3CSTRONG%3E-%3C%2FSTRONG%3E%22..%3C%2FP%3E%3CP%3E%3CU%3EFUNDSMULTI%3C%2FU%3E-%3CU%3EENTITY%20DOCUMENTS%3C%2FU%3E-%3CU%3E2015%3C%2FU%3E-%3CU%3E10-31-15%3C%2FU%3E%20%3CU%3EETF%20FORMS%3C%2FU%3E-%3CU%3E2016-08-16%3C%2FU%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20any%20help%2Fsuggestions!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-352486%22%20slang%3D%22en-US%22%3ERe%3A%20Mass%20File%20Upload%20(file%20name%20parse%20for%20column%20data)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-352486%22%20slang%3D%22en-US%22%3E%3CP%3EAs%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F177418%22%20target%3D%22_blank%22%3E%40Matt%20Weston%3C%2FA%3E%26nbsp%3Bsaid%2C%20you%20can%20certainly%20use%20PowerShell%20for%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESince%20you%20say%20you're%20relatively%20new%20to%20SharePoint%2C%20you%20might%20want%20to%20consider%20a%20purpose-built%20SharePoint%20migration%20tool.%20Microsoft%20makes%20a%20free%20one%20for%20migrating%20to%20SharePoint%20Online.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20migrating%20to%20SharePoint%20Server%2C%20I%20would%20look%20at%20ShareGate.%20Best%20bang%20for%20your%20buck%20and%20easy%20to%20use%20interface.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146%22%20target%3D%22_blank%22%3E%40Benjamin%20Niaulin%3C%2FA%3E%26nbsp%3Bfrom%20ShareGate%20and%20others%20might%20be%20on%20here%20if%20you%20want%20to%20message%20them.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-335328%22%20slang%3D%22en-US%22%3ERe%3A%20Mass%20File%20Upload%20(file%20name%20parse%20for%20column%20data)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-335328%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F281970%22%20target%3D%22_blank%22%3E%40mdahlstrom_87%3C%2FA%3E%26nbsp%3B%2C%20what%20type%20of%20workflow%20are%20you%20using%20to%20process%20these%20files%20at%20the%20moment%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20soon%20as%20you%20mentioned%20file%20server%2C%20I%20would%20immediately%20reach%20for%20PowerShell%20to%20do%20the%20parsing.%20There%20are%20tools%20out%20there%20that%20will%20do%20file%20system%20migration%20for%20you%2C%20but%20you'll%20probably%20still%20end%20up%20doing%20some%20PowerShell%20scripting%20to%20break%20apart%20your%20filename%20in%20order%20to%20set%20the%20metadata%20column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEffectively%20you%20could%20do%20something%20like%20this%3A%3C%2FP%3E%3CP%3E%24filename%20%3D%20%22%3CU%3EFUNDSMULTI%3C%2FU%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CU%3EENTITY%20DOCUMENTS%3C%2FU%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CU%3E2015%3C%2FU%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CU%3E10-31-15%3C%2FU%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CU%3EETF%20FORMS%3C%2FU%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CU%3E2016-08-16.docx%22%3C%2FU%3E%3C%2FP%3E%3CP%3E%3CU%3E%24arymetadata%20%3D%20%24filename.split('-')%3C%2FU%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%24field1%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%24arymetadata%3C%2FSPAN%3E%3CSPAN%3E%5B%3C%2FSPAN%3E%3CSPAN%3E0%3C%2FSPAN%3E%3CSPAN%3E%5D%20%23FUNDSMULTI%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%24field2%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%24arymetadata%3C%2FSPAN%3E%3CSPAN%3E%5B%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3E%5D%20%23ENTITY%20DOCUMENTS%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EYou%20can%20then%20upload%20your%20file%20and%20set%20the%20relevant%20metadata%2C%20and%20also%20change%20the%20filename%20at%20that%20point%20if%20you%20wanted%20to.%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

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
Highlighted

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.

 

 

Highlighted

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.