I've never used the Automator app, as I've always created Applescript apps in Script Editor or Xcode to achieve this kind of workflow, but I've posted a basic vanilla AppleScript below that works on the filename you posted, and it will only work on filenames with that very same filename format.
Code:
set theLenFileAlias to (choose file) as alias
tell application "Finder"
set theLenFilePath to file theLenFileAlias as text
set theLenFileNameText to name of theLenFileAlias as text
set theNewLenFileName to my createNewLenFileNameFromText:theLenFileNameText
-- return theNewLenFileName -- Uncomment this line to see the return value of createNewLenFileNameFromText: method.
if theNewLenFileName ≠ missing value then
set name of file theLenFilePath to theNewLenFileName -- Changes the name of the chosen file to the new name format.
end if
end tell
on createNewLenFileNameFromText:theOldLenFileNameText
set oldTextItemDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to "."
set theLenFileNameTextItemsList to text items of theOldLenFileNameText as list
set AppleScript's text item delimiters to oldTextItemDelimiters
-- return theLenFileNameTextItemsList -- Uncomment this line to see the file name text items.
if (count of theLenFileNameTextItemsList) ≠ 6 then
return missing value
end if
set theJobNumberText to (item 1 of theLenFileNameTextItemsList) as text
-- return theJobNumberText -- Uncomment this line to see the job number text.
try
-- Change to item 4 if the first PMS number in the filename is wanted.
set thePMSNumberWordsList to words of (item 5 of theLenFileNameTextItemsList) as list
-- return thePMSNumberWordsList -- Uncomment this line to see the PMS number word items.
set thePMSNumberText to (item 2 of thePMSNumberWordsList) as text
-- return thePMSNumberText -- Uncomment this line to see the PMS number as text.
on error
return missing value
end try
set theNewLenFileName to (theJobNumberText & "-" & thePMSNumberText & ".len") as text
return theNewLenFileName
end createNewLenFileNameFromText:
If you copy and paste this code into a new AppleScript file in Script Editor, and then hit the run button, you will be able to choose a file with your posted filename format, and it will rename it with the style you've asked for.
I've also commented out some method return values, that you can uncomment, to see how the script breaks the original filename, and then creates a new filename based on the broken down elements.
This script does not represent a complete solution to your problem, but may give you a basis on which to build upon.
Also the createNewLenFileNameFromText: method syntax will only work on OSX 10.10 or 10.11, so if your using an earlier version of OSX, then let us know, and we will show you how to change the method declaration to suit your operating system version.
And maybe another member with knowledge of the Automator app, may be able to show you how to change and incorporate it into an Automator workflow.
Regards mark