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

Question

Question

How to get parent folder?

asked on August 30, 2017 Show version history

Hi all,

 

Under workflow, using regular expression, I need to get the parent's folder and the folder before.

Example :

Folder Main \ Folder 1 \ Folder 2 \ Folder 3 \ document.

 

I want to get "Folder 2 \ Folder 3".

 

I tried ([^\\]*)$ but I only get "Folder 3".

 

With (\\.*\\*)$ I have Folder 1 too (I don't want Folder 1)

Someone have the pattern?

Thanks in advance

Regards

Answer

SELECTED ANSWER
replied on August 30, 2017

Oliver,

You can do it in pattern matching, but I prefer the two following approaches.

1. Do a split on \ in your token editor, then apply the index from the end.

2. Use the find entry activity on the entry ID you are looking for as it also returns the parent folder ID, name and more.

replied on August 30, 2017 Show version history

Hi John,

 

Thank you for your help.

It's working.

 

Regards

Replies

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