Code Sample : How to programmatically download all solutions (WSPs) in SharePoint
Once a solution has been added to SharePoint, then there’s no apparent way to download it. Using the SharePoint object model we can easily download a wsp using the ‘SaveAs’ method.
The C# code below illustrates how to download all of the solutions in the farm with just a few lines.