Tech Support > Computers & Technology > Sorting files in order
Sorting files in order
Posted by Charlie Bress on November 9th, 2003


The OS is Win98SE

Sometimes I have a series of files that include a number in the filename.
But when I look at the list in Mycomputer or other program they do not
appear in numerical order.

For example, if I have a series of jpgs that are named pic-1.jpg, pic-2.jpg,
......pic-10.jpg etc. the file listing shows all the files in this manner:
pic-1.jpg, pic-10.jpg, ....pic-19.jpg, pic-2.jpg, pic-21.jpg etc.

Is there some setting to get the files in numerical order or is there a
better naming convention?

Charlie


Posted by Me on November 9th, 2003


They are in alphanumeric order. Try leading zeroes pic-01.jpg or
pic-001.jpg .

Charlie Bress wrote:

Posted by Charlie Bress on November 9th, 2003



"Charlie Bress" <Here-I-am@the-last-moment.com> wrote in message
newsYudndWnaejE_DOi4p2dnA@comcast.com...
It finally dawned on me is that the problem is that the file name does not
look like a numeric but as an alphanumeric (or label, if you like the
spreadsheet terminology.

The quick fix was to rename the single digit files from pic-1.jpg to
pic-01.jpg etc. The same thing one had to watch out for when using that old
DOS Sort function.


Charlie




Posted by why? on November 9th, 2003


X-No-Archive: Yes
On Sun, 9 Nov 2003 10:46:19 -0500, Charlie Bress wrote:

It's ASCII - 1 , 10, 2 , 21

2nd option works fine, makes it appear numeric.
pic-01
pic-02
pic-03
pic-10

Simply add the required number of leading '0''s as needed if you have
100 or 1000 etc files.

Check www.google.com
Searched English pages for
ascii numeric sort
Results 1 - 10 of about 68,000. Search took 0.28 seconds.

Me

Posted by Daniel Ruscoe on November 9th, 2003


In article <pYudndWnaejE_DOi4p2dnA@comcast.com>, Charlie Bress says...
Easiest way:

pic-01.jpg, pic-02.jpg, pic-03.jpg...

--
Daniel Ruscoe
http://www.dualstone.co.uk
http://www.dannyruscoe.co.uk

Posted by LO&MsLO on November 11th, 2003


On Sun, 9 Nov 2003 11:00:49 -0500, "Charlie Bress"
<Here-I-am@the-last-moment.com> wrote:

WOW!! DOS!!! Now I'm impressed.
It's good to see some old 'dos dogs' out here.

John



Similar Posts