Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Can someone please provide a good link (or if you already have a powershell working) that can import files from file share into SharePoint document library using a cvs flat file. I have about 20 columns of all types (string, multi-string, datetime, managed-metadata, choice, etc.).

I saw few but nothing promising. I am short of time and can't evaluate each and every article I run into when doing a bing search. Please suggest. Not sure if this article (http://www.spjeff.com/2012/02/26/powershell-upload-csv-file-to-list-both-server-and-client-om/) is good for document library.

Thanks Brandy Osborne

share|improve this question

2 Answers

Just to understand correctly, do you want to use the CSV file to provide metadata for the files that will be imported from the file share? If so, the approach depicted in the article (SPJeff) will not work. This sample uses a SP list as destination (as opposed to a SP library which is needed to support files).

Look at this article in Code Project (http://www.codeproject.com/Articles/103503/How-to-upload-download-a-document-in-SharePoint-20); this should give you good pointer on how to use the SP API to upload a document AND set the metadata elements.

HTH!

Alain Lord

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.