in reply to Re^2: Find the last item in a series of files
in thread Find the last item in a series of files

I agree with you. I chose split on the basis of the example provided in the OP (file.001, file.002, ...). A regex would be more robust for more complex filenames.

I also think that the one-line version of the if ... else statement is less easy to understand (that's why I used the other version in the complete code version), I only wanted to show it could also be made more concise.