SharePoint - How to upload the files and folder in sharepoint 2010 document library programatically.

Asked By Rahul Khanna on 08-Apr-13 11:08 AM
Hi all,

I have a requirement like programatically i have to upload files and folder from files system to sharepoint 2010 document library.

Condition is:user will pass the following parameters in the config file:
1)Source folder location(from file system)
2)Destination sharepoint site URL.
3)Sharepoint Document Library Name.

Now using object model or web service how can we upload the folder contains from source to destination(doc library) which will have same folder hierarchy as like source hierarchy in file system.Thanks in advance, any help is appreciated.