Forum Discussion
smaharms-wende
Feb 08, 2023Copper Contributor
Bulk Upload files and meta data from file share into sharepoint online doclib
Hi, We have a requirement to upload image files from fileserver shares into a document library. In addition we need to upload meta data e.g. (Title | Description | Productfamily....) into the corr...
SvenSieverding
Feb 08, 2023Bronze Contributor
Hi smaharms-wende ,
I would use the SharePoint Migration Tool (https://spmt.sharepointonline.com/install/default.htm ) to upload the files themselves (This handles uploads of bulk data very well).
Then i would store all the metadata in a CSV file and use PnP PowerShell to update the metadata of the files
#Url;Doclib;Title;Othervalue
#/sites/mysite/Documents/Document.docx;Documents;New Title;New Othervalue
$CSVData = Import-CSV $filepath
Connect-PnPOnline https://yourtenant.sharepoint.com/sites/mysite -Interactive
$CSVData |foreach-object {
$item=Get-PnPFile -Url $_.Url -AsListItem
Set-PnPListItem -List $_.Doclib -Identity $item.Id -Values @{Title=$_.Title;Othervalue=$_.Othervalue}
}
Best Regards,
Sven
smaharms-wende
Feb 09, 2023Copper Contributor
Hi Sven,
thank's a lot for your fast reply. I will download SPMT and test your solution asap.
Best regards
Stefan