Why did invoice 10 land before invoice 2 in my merge list, and how do I avoid it?
Because names are often sorted character by character rather than as numbers, so the '1' in invoice-10 is compared with the '2' in invoice-2 and the tenth invoice wins. The [[merge-pdf]] list takes files in the order they arrive, so fix positions with the move buttons before merging, and name files with leading zeros, such as invoice-02, from now on.
What is actually happening
When a computer compares two pieces of text, it goes character by character. invoice-10 and invoice-2 match up to the hyphen, then comes '1' in the first and '2' in the second. Since 1 is less than 2, invoice-10 goes first, whatever follows. Some file browsers display names in a clever numeric order, but the order your browser hands to the tool can differ from what you see in the folder.
So never assume the order is right. The list in Merge PDFs is numbered and shows each file's full name, and one glance is enough to spot the problem.
Fixing the list before merging
The list arrived as invoice-1, then invoice-10, then invoice-2.
Press 'Move up' next to invoice-2 once, and it goes from position 3 to position 2.
The new order is invoice-1, invoice-2, invoice-10, and the tool announces the file's new position.
With three files that is one press. With twenty invoices numbered 1 to 20, it could be dozens of presses. That is when preventing the problem is worth the effort.
Prevent it: leading zeros
- Decide how many digits you need. Two are enough for fewer than 100 invoices a month; use three beyond that.
- Name the files invoice-01, invoice-02 up to invoice-10, or 001, 002 if you need three digits.
- Character order now matches number order, because 01 comes before 10 either way.
If you have a list of the file names and want to see the correct numeric order before renaming, paste it into the Line sorter with numeric sorting on, and use the result as a reference while you check the merge list.
Common questions
Can the tool sort the list numerically for me?
No. The merge list keeps the order files were added in, and you change it with the move buttons.
Does putting a date in the file name help?
Yes, if you write it year, month, day with two digits each, like 2026-09-05, so alphabetical order becomes date order.
Can I add files one by one in order instead?
Yes. Each file you add goes to the end of the list, so adding them in sequence gives you the right order.
