programmatically upload files in sharepoint 2010

me24hour
me24hour used Ask the Experts™
on
Hi,
I have 2 folders. The first folder carries 3 files and the second folder carries 4 files.
I want to upload those files into sharepoint in a way such that:
1) It creates two document libraries in SP. Each document library will have the same as the folder name.
2) Each document library will carry the files that are present in the folder.
3) There is one excel sheet at the root location which carries metadata associated with all the files.
4) code should read the metadata from the excel sheet and update that metadata information while uploading file into the sharepoint document library.

I want to use C# code to do this.
Any help is highly appreciated.

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I am using the following link.
http://geek.hubkey.com/2007/10/upload-file-to-sharepoint-document.html

Please let me know if there are any changes i need to make in this code.
Commented:
You might just invoke a tool called DavCopy:(http://www.bluedoglimited.com/Downloads/SitePages/DavCopy.aspx)

The other way to do this is via webservices.   You could use lists.asmx.  Here is one of the better articles discussing this:
http://msdn.microsoft.com/en-us/library/hh537940.aspx

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial