I have a List which has a two level hierarchy of folders. Something like this:
List
Folder_1
SubFolder_1
Item 1_1_1
Item 1_1_2
SubFolder_2
Item 1_2_1
Item 1_2_2
Item 1_2_3
Folder_2
SubFolder_1
Item 2_1_1
Item 2_1_2
Item 2_1_3
SubFolder_2
Item 2_2_1
Item 2_2_2
I want to add a list item to a folder depending on some criteria. I don't want to loop through all folders as the number of folders is more. So, I thought of running a CAML query to get the folder.
Below CAML Query gives me all folders in the list:
<Where>
<Eq>
<FieldRef Name='FSObjType' />
<Value Type='int'>0</Value>
</Eq>
</Where>
How can I add another condition to the above query so that I can get a specific folder when I know the exact folder name?