Why can't my computer count?

Please tell me I’m doing something wrong here, because I’d hate to think my computer is this poorly designed…

I’m using Windows 98ME, and have a folder with 27 .jpg photos, numbered 1-27. When I go into the “View” menu in the folder and choose “Arrange Icons” by “Name”, they get lined up like this:

1, 10-19, 2, 20-27, 3-9.

WTF?!?!

This is really screwing me up because I plan to use them in a slideshow where they need to go in numerical order. Two different slideshow viewer programs apparently get their sorting instructions from Windows, and therefore can’t do it. I could re-name them alphabetically, but that’s stupid. So…

  1. Why can’t my computer re-name with numbers properly?

  2. And why that order? (It happens that way every time even if I re-sort by type or size and then try again.)

  3. Suggestions for my slideshow project?

Try naming them 01.jpg, 02.jpg, 03.jpg, and so on.

The problem is that the computer is only smart enough to look at the frst character int he name for sorting, then goes tot he second character to break ties. So 1 comes before 10, but 10 comes before 2. It’s really logical when you think like a computer.

Perhaps the right way to say this is that the file sort is alphanumeric.

Windows arranges those files in “alphabetical” order with digits before letters (and 0 before the other digits.)

The significance of a character is only determined by its position and windows does not try to parse the file name in any way.
Recognizing the numbers and sorting them the way you expect could easily be done. However the current method is both easy to implement and to remember.
(Once you introduce parsing, how do sort the following numbers: “10000” “10 000” “10001” “10 001”…)

In your case renaming the files 1-9 to 01-09 will be the easiest solution. If you have to do this very often there are freeware file renamers that can automate this task.

Well, yeah. But the fact that the OP was asking the question in the first place makes me think that busting out with a “The file sort is alphanumeric” would be somehow less than helpful.

fnRenum is a simple command line tool that renames all files as required.
It has rather limited capabilities but a simple

fnRenum <files>

will rename your files to 001.jpg-027.jpg.

Thank you folks! My slideshow is up and running. :smack:

I’m a little surprised I didn’t think of the 01-02 thing myself, because now it seems really obvious. Usually I’m pretty good at this kind of stuff, which is why I’m one of the computer troubleshooters at work. But oddly enough, I never came across this particular situation before.

Thanks again!

The same thing happens with the date sort: 01/11/03 comes before 02/02/02. Windows sux. :mad:

With dates, if you format them yy/mm/dd, they will sort correctly.

FYI, the sorting problem has been fixed in Windows XP. Also they’ve added a multiple-file rename feature that will automatically number and sort files for you.

One more reason we should use the YYYY-MM-DD format. :slight_smile:

You mean, yyyy/mm/dd.

And never mind BC