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

Question

Question

Delete all documents in Folders

asked on June 3, 2015

I want to delete all the documents in all sub folders inside a parent folder. Can someone please let me know how do I do that in Workflow please? Thanks.

0 0

Replies

replied on June 3, 2015

You can use this advanced search

{LF:Name="*", Type="DB"} & {LF:LOOKIN="%(RepoAddressRoot)"}

This will find all documents under the path represented by %(RepoAddressRoot) and it will include its subfolders. Then you can just loop through the entries of the result set and delete them.

1 0
replied on June 3, 2015

This looks like a one-time action since you seem to want to delete all documents from the repository, so it will be more efficient to do it from the Client or Web Access.

1 0
replied on June 3, 2015

Will the below Advanced syntax find all the sub folders within a folder please?

({LF:Name="*", Type="F"} - {LF:ChildName="*", Type="D"} -{LF:ChildName="*", Type="F"})& {LF:LOOKIN="%(RepoAddressRoot)\"}

 

The token %(RepoAddressRoot) has a value of the top level folder.

Thanks

Priya

0 0
replied on June 3, 2015

This syntax will return all the empty folders directly within the RepoAddressRoot folder: {LF:Name="*", Type="F"} looks for all folders, but then you specify that they should not contain any documents - {LF:ChildName="*", Type="D"} or any folders -{LF:ChildName="*", Type="F"} .

I recommend Alex's syntax if you want to find all of the documents themselves and not return any folders, which is probably the most effective way to handle the deletion assuming you want to delete just the documents and not the folders.

To return all the folders and subfolders (and not return the documents): {LF:Name="*", Type="F"}&{LF:LOOKIN="%(RepoAddressRoot)"}

To return all non-empty folders and subfolders (and again, not the documents themselves): {LF:ChildName="*", Type="BDFS"}&{LF:LOOKIN="%(RepoAddressRoot)"}

 

0 0
replied on June 4, 2015

Thanks so much.

 

Priya

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

Sign in to reply to this post.