SPList currentLib = web.Lists["LibraryName"];
Get all items from the document library
foreach (SPListItem item in items)
{
byte[] binfile = item.File.OpenBinary();
FileStream fstream = new FileStream("C:\\" + item.File.Name,
FileMode.Create, FileAccess.ReadWrite);
fstream.Write(binfile, 0, binfile.Length);
fstream.Close();
}
Ads by Google
nice!
ReplyDelete