Sort files in Job after number

Post Reply
JuBaz
Member
Posts: 20
Joined: Tue Dec 07, 2021 11:41 am

Sort files in Job after number

Post by JuBaz »

I have two files for each Job which should be merged to one PDF in a specific order. The files are named, 1A, 1B, 2A, 2B, 3A, 3B, 4A, 4B, and so on. 1A has to be the first and 1B has to be the second. Seems simple but I nearly go crazy about this :? .
I've tried different settings of "Sort files in Jobs" but I didn't get it working the way I wanted. As you can see in the Screenshot attached, it doesn't work for the files 4A and 4B if I choose to sort after numbers.
I even thought it wouldn't be necessary to sort the files because I always thought that Callas would merge the files in alphanumeric order but that also doesn't work.
Attachments
SortfilesinJob.png
SortfilesinJob.png (157.21 KiB) Viewed 4253 times
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Sort files in Job after number

Post by freddyp »

Segment with start index 1 and length 2 means you are sorting on the first three characters of the filename. In your case that is 008 for all files. If sort keys are identical you get an alphabetical sort.

My suggestion: use Search with the regular expression _\d.+$ (an underscore, followed by a digit, followed by one or more characters at the end of the string). That will extract _1A.pdf, _1B.pdf, etc. Sort as numbers: No, because the first character of the extracted string is not a number and the extracted parts sort correctly when sorted alphabetically.
JuBaz
Member
Posts: 20
Joined: Tue Dec 07, 2021 11:41 am

Re: Sort files in Job after number

Post by JuBaz »

It works now. Thanks for your support!
Post Reply