Sorting files with numeric names

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

Post Reply
User avatar
Aokromes
Posts: 204
Joined: Wed Oct 22, 2003 3:40 am
Location: Vitoria-Gasteiz Beyond Stargate Network ;)

Sorting files with numeric names

Post by Aokromes » Tue Dec 09, 2003 1:01 pm

Hi, i have seen that if you have for example:

1.jpg
2.jpg
7.jpg
8.jpg
9.jpg
10.jpg
11.jpg
12.jpg

but when i try to see the files are sorted as:

1.jpg
10.jpg
11.jpg
12.jpg
7.jpg
8.jpg
9.jpg

There is any mode of force to see the files on the correct order without renaming the files?

User avatar
helmut
Posts: 8176
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Sorting files with numeric names

Post by helmut » Wed Dec 10, 2003 6:58 am

Aokromes wrote:... Is there any mode of force to see the files on the correct order without renaming the files?
What you want/need in XnView is a way to sort files numerically. This might make sense in some cases, but is not supported by XnView 1.66. I am not sure whether this is needed often. Perhaps readers can let us know, here.
What you could do is renaming the files to 001.jpg, 002.jpg, ..., rather than just 1.jpg, 2.jpg. By doing so sorting will work both in XnView, MS Explorer, and other applications.

Christoph

Re: Sorting files with numeric names

Post by Christoph » Fri Dec 12, 2003 5:19 pm

helmut wrote:I am not sure whether this is needed often. Perhaps readers can let us know, here.
Numerical sorting would really be a useful feature, just think of filenames including a date in german format like 11-12-2003.bmp (naming as 2003-12-11 will solve the problem too...). I would be glad if this could be implemented in a future version of XnView.

Greetings
Christoph

User avatar
helmut
Posts: 8176
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Sorting files with numeric names

Post by helmut » Sat Dec 13, 2003 10:23 am

Christoph wrote:... just think of filenames including a date in german format like 11-12-2003.bmp...
As long as the length of the name is constant (e.g. ..., 09.bmp, 10.bmp, 11.bmp, ...), numeric and alphabetical sorting will do exactly the same.
So it would not help in your case with filenames with German dates "14-12-2003.bmp", "31-03-2003.bmp".

angelman
Posts: 4
Joined: Wed Jan 07, 2004 10:45 am

Post by angelman » Wed Jan 07, 2004 11:57 am

numeric number sorting would be VERY useful. I use a lot of unpadded images ie. the format test.1.jpg, test.2.jpg especially when moving from one image to the next using the mouse wheel which is a very nice feature, the images usually come in out of order.
Maybe there could be an option to 'always sort numerically' if xnview detects a number of files labelled in the format described above it will always deal with them sorted numerically...

User avatar
crazytb
Posts: 124
Joined: Wed Oct 15, 2003 2:51 am
Location: Brazil
Contact:

Post by crazytb » Thu Jan 08, 2004 4:32 am

I also think that numeric sort would be VERY cool. Sometimes, it is easier for us to leave files unpadded (for example, to use in some script). Other times, it is impossible to us to rename the images (read-only media, or some program needs those images with exactly those names). I vote for this feature!!! :)

Post Reply