Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 2
    Surely you want two leading zeroes? Commented Mar 27, 2016 at 2:05
  • you need to rename your files so that they ALL have the SAME number of digits in the numeric portion of the filename, left-padded with zeroes. e.g. if you have more than 99 files, you'll need three digits: 001, 011, 100, etc. if more than 999, then 4 digits: 0001, 0011, 0100, etc. Commented Mar 27, 2016 at 2:10
  • 1
    I don't want two leading zeroes. I'm looking for consistency, and I'm asking this question because I believe there must be some way for the shell or filesystem to determine order other than by having matching number of digits for all files in a directory. Commented Mar 27, 2016 at 2:22
  • I don't see why it seemed surprising that one didn't work, is all. I don't think the locale can have that sort of collation behaviour, but I would be interested to find out. Commented Mar 27, 2016 at 3:00
  • 2
    "The order in which files are read by programs" is the order you told them to, not anything to do with the program reading them. I suspect you'd have to write your own locale to get general sorting to behave that way, and I'm not sure it's even possible to do it then. A more focused question on that topic might be more likely to be seen by someone who knows about doing that. Commented Mar 27, 2016 at 6:22