Retrieving file names from directory

Sep 9 2009 6:02 PM

I have some files in my directory.
09001-1.pdf,  09001-2.pdf,  09001-3.pdf,  09001-4.pdf,  09001-5.pdf,  09001-6.pdf,  09001-7.pdf,  09001-8.pdf,  09001-9.pdf,  09001-10.pdf,  09001-11.pdf,  09001-12.pdf,  09001-13.pdf        in the same order.
When i wrote code for retrieving files from directory, I got output like this
09001-1.pdf,  09001-10.pdf,  09001-11.pdf,  09001-12.pdf,  09001-13.pdf,  09001-2.pdf,  09001-3.pdf,  09001-4.pdf,  09001-5.pdf,  09001-6.pdf,  09001-7.pdf,  09001-8.pdf,  09001-9.pdf
why is this and how can i get output in the same format as i have files in my directory? Please tell me.

Answers (2)