You are viewing limited content. For full access, please sign in.

Question

Question

Search for documents on subfolders

asked on May 20, 2014

 Greetings. I am using sdk 9.0 of Laserfiche and I am trying to read a parent folder and list all the documents on the subfolders below it. I am using this code FolderInfo myFolder = Folder.GetFolderInfo("\\ROOT\\PARENT_FOLDER\\", session);             using (FolderListing listing = myFolder.OpenFolderListing(entrySetting, 1000)) {} when I look at the listing object, I can see the folders but not documents, I've already filtered my entrySetting to get AllTypes of objects, but I am interested on the contents of the subfolders. Any clue how I should proceed? Best Regards.

 

Caio Himmelsbach

0 0

Answer

SELECTED ANSWER
replied on May 20, 2014

The listing returned by OpenFolderListing only contains the immediate children of that folder. This means that if the folder only directly contains other folders, you will just get those folders back. If you want to get the documents contained in the folder and all of its subfolders you have two options: 1.) Recurse through all of the subfolders returned by OpenFolderListing or 2.) Use a search object instead of manually going through the folders. I would recommend option 2; the server provides search functionality for a reason! The syntax for the appropriate search would be

{LF:LOOKIN="myFolder"}

 

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.