Remove 000 from my Heriarchy Path

Post Reply
numnational
Member
Posts: 27
Joined: Tue Sep 30, 2014 3:28 pm

Remove 000 from my Heriarchy Path

Post by numnational »

file name.jpg
file name.jpg (146.01 KiB) Viewed 2082 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.
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Re: Remove 000 from my Heriarchy Path

Post 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.
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Re: Remove 000 from my Heriarchy Path

Post by freddyp »

I meant: for 0525 it matches the first 5 ...
numnational
Member
Posts: 27
Joined: Tue Sep 30, 2014 3:28 pm

Re: Remove 000 from my Heriarchy Path

Post by numnational »

Thank you freddyp it work perfectly :-)
Post Reply