Page 1 of 1

Remove 000 from my Heriarchy Path

Posted: Wed Nov 23, 2016 2:20 pm
by numnational
file name.jpg
file name.jpg (146.01 KiB) Viewed 2086 times
Hi all,

I have a request.

I must use a path to archive my pdf, and my path is like this always on 4 digit.

Today we work with 0153 all is OK. but now i must change this and use only 153, without the "0".

In my example on the attachment i want to create folder with :
4000 (folder)
--------4000.pdf
525 (folder)
--------0525.pdf
20 (folder)
--------0020.pdf
10 (folder)
--------0010.pdf
3 (folder)
--------0003.pdf

I try to test some different way to do this but i don't found the solution. I can rename with a exep with search and replace but the tool "Set Hierarchy path" can't work with the same because don't have the "search and replace".

Any idea to help me ?

Thanks.

Re: Remove 000 from my Heriarchy Path

Posted: Wed Nov 23, 2016 2:56 pm
by freddyp
Define the hierarchy path as [Job.NameProper:Before="-",Search="[^0]\d*"]

Meaning: take the part before the hyphen and in that part search for the first non-zero character followed by zero or more digits. So for 4000, the non-zero matches the 4 and all that follows, for 525 it matches the first 5 and all that follows, etc.

Re: Remove 000 from my Heriarchy Path

Posted: Wed Nov 23, 2016 2:57 pm
by freddyp
I meant: for 0525 it matches the first 5 ...

Re: Remove 000 from my Heriarchy Path

Posted: Wed Nov 23, 2016 3:30 pm
by numnational
Thank you freddyp it work perfectly :-)