Jump to content


Sorting filenames froma readdir

  • Please log in to reply
1 reply to this topic

#1 SCook

  • Members
  • PipPipPip
  • Advanced Member
  • 73 posts

Posted 20 July 2006 - 03:23 PM

Hi all.

Here's my dilemma.  I am doing a readdir to retrieve a list of filenames.  The filenames are like this: 00.jpg .... 09.jpg and so on.  Now, what I get from the while loop and the readdir is something like: 02.jpg,05.jpg,00.jpg,01.jpg and so on.  This is no good, how can I get it to read in order?  Thanks.

#2 trq

  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 20 July 2006 - 03:38 PM

You may find it easier to use scandir() instead.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users