Skip to main content
Question

File Rename Order Issue after splitting pdf

  • January 22, 2026
  • 1 reply
  • 38 views

Forum|alt.badge.img+4

The file name set by the action split document would end up having my files to be created and named: File_1, File_2, File_3, …… File_10, File_11, File_12. and then after that by having a loop for every file in a folder with the rename action in it, it’s going to rename in the order of File_1 first, then File_10, File_11, File_2 which is not what I want. I want it to rename in order from File_1, to File_12. How do I do that?

 

1 reply

Forum|alt.badge.img+3
  • Navigator | Tier 3
  • January 22, 2026

@PlayEatSleep Great question!

Here is how I would attack the issue:

1. Find out how many files I have in total. This can be done by looping through all the files and incrementing a counter. (This part isn't filename specific.)

2. Create another loop, for X number of times, using that counter from the previous loop as the finishing number. Assign the current value to a different counter variable. 

3. Process the files using the filename File_$nSecondCounter.Number:toString$.pdf

That should work in numeric sequence of your files.