I am trying to retrieve only documents from a library. When I use this CAML:
<Where><Eq><FieldRef Name='FSObjType' /><Value Type='Lookup'>0</Value></Eq></Where>
I get only the documents in the root. No items form the sub folders.
when I use this:
<Where><Eq><FieldRef Name='FSObjType' /><Value Type='Lookup'>1</Value></Eq></Where>
I get only folders coming in the results.
The reason I need this is to delete all files under the document library and keep the folder structure.
any help would be much appreciated.
My folder structure for test purposes:
My Document Library
-Folder1
-Document1
-Document2
-Document3