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

Question

Question

Use folder path of document to fill out METADATA..

asked on July 5, 2018

I have an instance of data where I would like to reverse engineer the METADATA entries (after the fact) so that the METADATA equals the current folder path. For example, I have two 9 digit codes used in the file path that I need to pull to use in the METADATA.

Here is the example file path ..\TEST\0001234567\000000123\TESTFILE. I would like to pull the 0001234567 out of the path and put it in one numeric METADATA field for the TESTFILE and put the 0000000123 in another METADATA field for the TESTFILE. This is to give the user the ability to search with METADATA versus just going into the folders and searching those paths.   There are thousands of entries I am trying to fill out the METADATA for in this reverse method. 

That is the only idea I could come up with but if there is a better way, please share. Thank you.

0 0

Replies

replied on July 5, 2018

Assuming this is all uniform, if you have access to Workflow this can be done fairly easily. You would create a search and loop through all the records that return. Then you set metadata in your loop.

If you do not have Workflow or Quickfields there is not an easy way to do this.

0 0
replied on July 5, 2018

I am trying this via WORKFLOW and working with the Assign Token Value activity. I couldn't find the Parse Folders activity you have above. I assume is the same since it has the same icon. 

I am pulling up the entry path for the document in the folder and applied formatting that I found that just pulls the last folder information that I can then apply to a token value. I cannot find anything on TRIMing the folder information to get the middle folder. I am using ([^\\]+)$ to get the end folder and I can use ([^\\]+) to get the first folder (000000123) but not sure how to get the middle folder out of the expressions I have found so far. I am guessing I could use a LEFT and RIGHT trim to only pull characters 11 through 19 from the RIGHT which would be the 2nd folder (0001234567) (i.e. out of  ...\0001234567\000000123\). 

0 0
replied on July 5, 2018

Correct, it is just an assign token values. To look at your folder values, I would take a look at this post. https://answers.laserfiche.com/questions/117453/regex-token-editor-to-pull-folder-name-from-middle-of-path#117738

0 0
replied on July 5, 2018

Thank you very much. That should get me where I need to go. A little more testing and I think I have it. 

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

Sign in to reply to this post.