Hi. The following code works, but if I replace the . path with for instance c:\ only files are listed, as directories are not identified and parsed.
This is on windows XP home
Just printing out the FileType codes yields 0 for all files/dirs on c:\ but correct 0,1 and 2 for files inside my test app directory?! What gives?
This is on windows XP home
Strict Function ListDir(path:String) Local dir:Int=ReadDir(path) Repeat Local t:String=NextFile( dir ) If t="" Exit If t="." Or t=".." Continue If (FileType(t) = 2) ListDir(path + "" + t) Else Print path + "" + t End If Forever CloseDir dir End Function ListDir(".")
Just printing out the FileType codes yields 0 for all files/dirs on c:\ but correct 0,1 and 2 for files inside my test app directory?! What gives?