SPSite site = new SPSite("http://[ServerName/sitename]");
SPWeb web = site.OpenWeb();
SPList list = web.Lists["ListName"];

SPFolder f = web.GetFolder("http://[ServerName/sitename]/Lists/ListName/FolderName" );
if(f.Exists)
{
   SPListItemCollection itemColl = list.Items;
   SPListItem item = itemColl.Add(f.ServerRelativeUrl  , SPFileSystemObjectType.File, null);
   item["Title"] = "Added from Code";
   item.Update();
}

http://suguk.org/blogs/tomp/archive/2006/09/28/Adding_SPListItems.aspx