nextfile$ order

Blitz3D Forums/Blitz3D Programming/nextfile$ order

Chevron(Posted 2005) [#1]
Hi,
How does Blitz decide which file is the first to be returned from a folder with multiple files with the nextfile$ command?

Thanks in advance


Perturbatio(Posted 2005) [#2]
it's alphabetical.


Chevron(Posted 2005) [#3]
Thats what I thought,but even using the demo in the command reference doesn't list the following files in order.

Top_0001.bmp .......Top_0010.bmp

but it does in explorer


poopla(Posted 2005) [#4]
I believe(but I'm not posotive), that it reads in a left to right order of the files in the folder(when viewed in the browser).


JazzieB(Posted 2005) [#5]
Files are pulled in the order that they are stored in the FAT tables on your drives, which is usually the order they were saved in.

I say usually because if you delete a file and then save a new file, it's information is stored in the slot that was occupied by the deleted file.

If you want to sort them, you'll need to store all the information in an array and then sort it for display purposes.


Chevron(Posted 2005) [#6]
Thanks for that info Jazzie, thats what I will do. Just glad that its not a bug with my code.

Cheers