Switching Directories

Blitz3D Forums/Blitz3D Beginners Area/Switching Directories

PoliteProgrammer(Posted 2007) [#1]
Does the file variable return to the start of the folder when switching directories

for example

directory = ReadDir("")
file$ = NextFile(directory)

If I then set directory = some other directory, and later set it back to the original directory, will the file$ variable read from the beginning of the folder again?


b32(Posted 2007) [#2]
I think it jumps back to the beginning. However, I think you can use it like this:
directory1 = ReadDir("c:\dir1")
directory2 = ReadDir("c:\dir2")

file$ = NextFile(directory1)
file$ = NextFile(directory2)

CloseDir directory1
CloseDir directory2