I have the following CAML query where i am trying to get all the files and folders that are directly and indirectly added to the folder named FolderA
:-
camlQuery6.ViewXml = "<View Scope=\"RecursiveAll\"><Query><Where><Eq><FieldRef Name=\"FileDirRef\" /><Value Type=\"Text\">" + context.Web.ServerRelativeUrl + "/ArchDocs/FolderA"</Value></Eq></Where></Query></View>";
ListItemCollection collListItem6 = context.Web.GetList(context.Web.ServerRelativeUrl + "/ArchDocs").GetItems(camlQuery6);
context.Load(collListItem6, items => items.Include(
item => item.Id,
item=>item["FileDirRef"],
item => item["Title"],
item => item["DealStage"]));
the above CAML will only return the main folder under /sites/projects/ArchDocs/FolderA
, but will not return any of the sub-folders and files.. so can anyone advice how i need to modify the CAML, or CAML does not support this?