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

Question

Question

Deleting documents with TEMP as file-name prefix

asked on January 19, 2016

I have a business process that saves the form at various points in a separate folder for each instance, with "TEMP" as a prefix to the file-name.

 

As the last step in the business process, before it terminates I would like to call a Workflow that deletes all files in the folder which start with "TEMP". I need some help in designing the workflow. 

 

If there's a better way to do this then please let me know about it.

 

Thanks,

Nirmal

0 0

Answer

SELECTED ANSWER
replied on January 19, 2016 Show version history

Hey Nirmal,

If you know that no other documents will have the name "TEMP", you can use a search repository activity to search for all documents within that folder path who's name starts with "TEMP", which would look something like '{LF:Name="TEMP*", Type="DB"} & {LF:LOOKIN="[FolderPath]"}'. 

Then you would use a For Each Entry activity to grab all the entries you found, then use the Delete Entry activity to delete each of those. 

If you can't guarantee that documents will not have 'TEMP', you could also add a metadata field which would also signal to workflow that the document should be deleted and also search for that field value.

 

If you don't know how many temporary forms you will be creating, this could be the best approach. However, if you do know how many and the specific location of each saved form, then you could just use the Find Entry activity to specifically find each form, which will save some time because you won't need to search through the repository.

Hope that helps,

Kevin

1 0
replied on January 20, 2016

Thanks a lot, Kevin. It worked beautifully.

0 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.