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


Problem solved, i'm stupid sometime...

SendTheFileList("C:/fILOU/")
'SendTheFileList(CurrentDir$())



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

	Local Num:Int=Len(dir)

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


The second call doesn't work for me either (on Linux - using a different path).

heh :-)

Maybe a difference between / \ ?