Rename PDF after Splitting

Post Reply
liver82
Newbie
Posts: 3
Joined: Sat Jul 16, 2016 10:34 am

Rename PDF after Splitting

Post by liver82 »

Hi to all,

I got a problem with the renaming of one PDF splitted.

I have a PDF, with two pages inside, named 1807NF10#, after that I had split it I would like to rename the 2 file in this way AEX18C10 and AEX18C11.
This is the flow I created:

Image

And this is the rename job I created:

Image

As you can see I created 5 actions, the last should have regular expresion that permit to change the last two characters in sequential mode but I'm not able to do this...
Someone can help me?

Thank you!
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Rename PDF after Splitting

Post by gabrielp »

Can you expand on this?
liver82 wrote:the last should have regular expresion that permit to change the last two characters in sequential mod
I'm not sure if you can rename based on the rename sequences within the same Rename configurator, but you could certainly pass it through a second rename if that ends up being the problem.

I would consider re-designing this workflow because it seems very easy to screw things up this way.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
liver82
Newbie
Posts: 3
Joined: Sat Jul 16, 2016 10:34 am

Re: Rename PDF after Splitting

Post by liver82 »

Thank you for your reply!

I found this: https://forum.enfocus.com/viewtopic.php?t=273 post but I can't setting for my situation, do you think that it could be done?
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Re: Rename PDF after Splitting

Post by freddyp »

What you need on the last rename is a Switch-Calculation. Based on just one example I am not sure if the following calculation is right, but it shows the principle.

It looks like you start from a base number (10) to which you add a counter (0, 1, ...). After the split of the pdf all the files have a counter (001, 002, ...) at the end of the name proper, and if you subtract 1 from that counter and add it to the base number, you have what you need:

[Switch.Calculation:Expression="10+[Job.NameProper:Search="\d+$"]-1"]
liver82
Newbie
Posts: 3
Joined: Sat Jul 16, 2016 10:34 am

Re: Rename PDF after Splitting

Post by liver82 »

Thank you,

I solved the problem creating two renaming flow and adding this suffix:

[Switch.Calculation:Expression="[Job.NameProper:Segment="8-8"]+1"].

Thank you to all.
Post Reply