Page 1 of 1

Sort files in Job after number

Posted: Fri Jan 20, 2023 11:30 am
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.

Re: Sort files in Job after number

Posted: Tue Jan 24, 2023 9:27 am
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.

Re: Sort files in Job after number

Posted: Mon Jan 30, 2023 12:29 pm
by JuBaz
It works now. Thanks for your support!