Retrieving file names from a directory
I have some files in my directory.
0904 Da103037105817012001 0809.pdf,
0904 Da 316A8500103082 0709.pdf,
0904 Da 316A8500103082 0809.pdf,
0904 Da 00000561 0709.pdf,
0904 Da 12971 0709.pdf,
0904 Da 01108103039014 0709.pdf,
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 in the same order.
I am using windows XP and files are sorted as per name.
When i wrote code for retrieving files from directory, I got output like this
0904 Da 00000561 0709.pdf,
0904 Da 01108103039014 0709.pdf,
0904 Da 12971 0709.pdf,
0904 Da 316A8500103082 0709.pdf,
0904 Da 316A8500103082 0809.pdf,
0904 Da103037105817012001 0809.pdf,
09001-1.pdf,
09001-10.pdf,
09001-11.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 order as i have files in my directory? Please tell me.