You can use below mentioned code to move files from one Document library to another document library programmatically.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
namespace MoveTo
{
class Program
{
static void Main(string[] args)
{
using (SPSite site = new SPSite("http://serverName:1111/SitePages/Home.aspx"))
{
using (SPWeb web = site.RootWeb)
{
SPFileCollection collFile = web.GetFolder("Shared Documents").Files;
int count = collFile.Count;
while (count != 0)
{
collFile[count - 1].MoveTo("Destination Library/" + collFile[count - 1].Name, true);
count--;
}
}
}
}
}
}
You can user SPQuery
to filter files from document library on above mentioned code...
Another method is to create ribbon button & get selected files on that button click event & move them to another document library.
Happy Coding.... :)