2013-03-28 1 views

답변

1

에서 하위 폴더에서 폴더 이름을 얻는 방법에 나를 도울 수 있습니다 모든 샘플 코드 또는 지금까지 시도한 코드 샘플을 보여줄 수 있습니까?

자세한 정보를 제공하거나 시도한 것에 대해 Google에 알려 주시거나 문제가있는 코드를 게시 해 주시면 질문에 답변하는 데 도움이됩니다. 내가 시도하고 응답을 제공합니다 후있어 무슨 생각을 기반으로하지만


, ...

한 가지 list.RootFolder.SubFolder[i] 실제로 당신에게 다른 SPFolder 객체를 반환 난다는 것입니다. 따라서 SubFoldersproperty에 다시 액세스하여 해당 하위 폴더 내의 하위 폴더를 가져올 수 있습니다.

SPFolder subFolder = list.RootFolder.SubFolder[i]; 
SPFolderCollection subFoldersOfSubFolder = subFolder.SubFolders; 

if (subFoldersOfSubFolder.Count > 0) 
{ 
    for (int j = 0; j < subFoldersOfSubFolder.Count; j++) 
    { 
     SPFolder specificSubFolder = subFoldersOfSubFolder[j]; 
     /* 
      At this point you could use properties like Name, 
      ServerRelativeUrl or UniqueId of the SubFolder class to get 
      the information you need. 
     */ 
    } 
} 
else 
{ 
    //If you get to here, it means that the sub-folder had no sub-folders 
} 
:

은 같은 순진 예를 비트,하지만 뭔가를 할 것입니다
관련 문제