Rename Job

Post Reply
SteveT
Newbie
Posts: 19
Joined: Sat Aug 10, 2019 10:32 pm

Rename Job

Post by SteveT » Mon Aug 31, 2020 11:53 pm

I want to do a simple task and yet there doesn't seem to be a simple way to do it! I have a file that I want to process for our production and then RENAME. The way I want to rename is to keep only the last seven characters (to the left of the extension) and delete the rest of the filename. (eg FOM_IMAFILE_100PERCENTSCALE_E.17-3.pdf to be renamed "E.17-3.pdf".
I have studied on the "Rename Job" flow element and cannot figure out how to make this happpen. Can anyone help? Thank you!

jan_suhr
Advanced member
Posts: 379
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Rename Job

Post by jan_suhr » Tue Sep 01, 2020 7:52 am

You will see "Define regular expression" in the properties under each Action.

There you can write a Regular Expression that works on [Job.Nameproper] and only use the last seven characters.

Google RegExp if you need help about it.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

magnussandstrom
Member
Posts: 24
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden

Re: Rename Job

Post by magnussandstrom » Wed Sep 02, 2020 2:51 pm

This should work: .{7}$

Change the number if you want more or less characters and remove the $ if you want to start from the first character instead of the last.
Attachments
regex.jpg
regex.jpg (77.37 KiB) Viewed 466 times
Last edited by magnussandstrom on Wed Sep 02, 2020 2:52 pm, edited 1 time in total.
Tools at hand: Enfocus Switch, Esko Automation Engine, Esko Imaging Engine, Apogee Prepress, HP DFE, Fiery, Caldera, GMG ColorProof, PressSign, Redhat FUSE, Microsoft Azure and Google Cloud Services.

Post Reply