LoadDir Problem ?

BlitzMax Forums/BlitzMax Programming/LoadDir Problem ?

I get a problem with loadir command ? any idea ?

SendTheFileList(Currentdir$()) ' Work
SendTheFileList("C:/Windows") ' Do not work (of course the directory exist...)

' ------------------
' Send the file list
' ------------------
Function SendTheFileList(Root:String)
	Local dir:String[]= LoadDir(Root)
	Local Number:Int=0

	
	For Local i:Int = 0 Until Len(dir)
		If FileType(dir[i]) = 1 Then
			Number=Number+1
		EndIf
	Next
	
	Print Number
	
	For Local o:Int = 0 Until Len(dir)
		If FileType(dir[o]) = 1 Then
			Print dir[o]
		EndIf
	Next
EndFunction