Hi,
I have been trying to get all files that located at "Shared Documents" at "MySite", I have been working on it and teste many different ways but I have failed everytime.
When I had installed just WSS it was easy and I find them by using following:
SPSite ISite = new SPSite("SPWeb IWebSite = ISite.OpenWeb();
SPFolder IFolder = IWebSite.GetFolder("Shared Documents");
SPFileCollection IFiles = Folder.Files;
but know when i have installed SPS 2003 it is not folder any more (I think) it is a list.
I have tested following but no success.
SPSite IMySite = new SPSite("SPWeb ISite = IMySite.OpenWeb();
SPFolder doc = ISite.Folders["Lists"];
OR
SPListCollection lists = ISite.Lists;
foreach (SPList list in lists)
{
if (list.BaseType == SPBaseType.DocumentLibrary)
.....
}
or another ways, I have failed andgot many expections
Thanks for your help.
I have been trying to get all files that located at "Shared Documents" at "MySite", I have been working on it and teste many different ways but I have failed everytime.
When I had installed just WSS it was easy and I find them by using following:
SPSite ISite = new SPSite("SPWeb IWebSite = ISite.OpenWeb();
SPFolder IFolder = IWebSite.GetFolder("Shared Documents");
SPFileCollection IFiles = Folder.Files;
but know when i have installed SPS 2003 it is not folder any more (I think) it is a list.
I have tested following but no success.
SPSite IMySite = new SPSite("SPWeb ISite = IMySite.OpenWeb();
SPFolder doc = ISite.Folders["Lists"];
OR
SPListCollection lists = ISite.Lists;
foreach (SPList list in lists)
{
if (list.BaseType == SPBaseType.DocumentLibrary)
.....
}
or another ways, I have failed andgot many expections
Thanks for your help.