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

Question

Question

Delete empty folder after route entry to folder

asked on June 20, 2016

Hi All,

 

i'm trying to delete empty folders after i did a route entry to folder. i had tried using delete entry

Option : Only delete empty folders

other Entry : Route Customer Service Order to Completed Folder

- Routing Folder

 

But it don't seem to be working. I think is due to the location where i placed my delete entry. But i not sure where i should placed it.

 

Thank you.

Delete empty folder.JPG
0 0

Replies

replied on June 21, 2016

Hi Jason,

 

How about deleting the empty folders overnight using a scheduled workflow then you don't have to worry about it?

 

You could search the repository using a scheduled workflow using the search syntax {LF:Name="*", Type="F"}-{LF:ChildName="*", Type=DFS} and have a 'for each entry' iterate through and delete, thus cleaning up the empty folders?

 

Just a thought.....frown

0 0
replied on June 21, 2016

Hi Chris,

 

Thank you for your reply.

 

1. If i only need to remove empty folder in that particular path. how should i modify your search syntax?

0 0
replied on June 21, 2016

Hi Jason,

 

The complicated bit as part of the workflow is you would need to create a token for the current folder path and use that in the search. Not sure off the top of my head....Will have a look in more detail later if you don't get sorted.yes

0 0
replied on June 21, 2016

Add this to the syntax Chris provided:

{LF:LOOKIN="insert path to folder here"}

This should restrict the search to all folders/subfolders within the path. Hope this helps!

0 0
replied on June 21, 2016

Thanks guy, i will do some testing base on the advises.

0 0
replied on June 21, 2016

Hi Chris,

 

Thank you for your reply.

 

1. If i only need to remove empty folder in that particular path. how should i modify your search syntax?

 

replied on June 21, 2016

If I'm reading this correctly, you have one Customer Service Order folder and it's got several orders in it? And you want to delete it after you've moved all orders out? Delete Entry should be after the For Each Entry loop in that case.

If that's not the case, can you describe your folder structure in more detail?

0 0
replied on June 21, 2016

Hi,

Thank you for your reply. I got 3 folder. i had attached a screenshot of my folder structure.

 

1. Completed Folder

2. Customer Service Order Folder

3. Customer Service Report Folder


After routing of the entry, i want to remove the empty folder in Customer Service Order.

 

I had tried previously putting delete entry after for each, it don seem to be working as well

 

Folder Structure.JPG
0 0
replied on June 22, 2016

Oh, I see. Yeah, your setup wouldn't work since Customer Service Order is not empty, it has subfolders. So you'd need to delete the subfolders first before you can delete the main folder.

You could use pattern matching on the path to extract the names of the subfolders and then run a For Each Value and delete them.

0 0
replied on June 22, 2016

Hi Miruna,

 

Is it possible for you to show me an example how i can use pattern matching on the path to extract the names of the subfolders and then run a For Each Value and delete them. If not, is there any sites that i can refer to?

 

Thank you.

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

Sign in to reply to this post.