Rename Job

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

Rename Job

Post by SteveT »

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: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Rename Job

Post by jan_suhr »

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
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: Rename Job

Post by magnussandstrom »

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 3184 times
Last edited by magnussandstrom on Wed Sep 02, 2020 2:52 pm, edited 1 time in total.
Post Reply