Hi Leute,
wieso wird die Variable $o nicht in der Funktion erkannt, obwohl sie "Global" ist?
[autoit]
#include <array.au3>
$test = _OrdnerRekursiv("C:\Neuer Ordner")
_ArrayDisplay($test)
Dim $Ergebnis[1][2]
Global $f = 0, $o = 0, $a = 0
Func _OrdnerRekursiv($sPfad)
$FFFF = FileFindFirstFile($sPfad)
If $FFFF <> -1 Then
While 1
$File = FileFindNextFile($FFFF)
If @extended = 1 Then
$o += 1
FileWrite(@TempDir & "\" & $o & ".ord", $File)
ElseIf Not @error Then
$f += 1
ReDim $Ergebnis[$f + 1][2]
If StringInStr($File, "/") <> 0 Then
$NeuFile = StringSplit($File, "/")
Else
$NeuFile = StringSplit($File, "\")
EndIf
$Name = $NeuFile[UBound($NeuFile)]
$Ergebnis[$f + 1][0] = $Name
$Ergebnis[$f + 1][1] = $File
Else
ExitLoop
EndIf
WEnd
EndIf
While 1
$a += 1
$sPfad = FileRead(@TempDir & "\" & $a & ".ord")
If @error Then
Return $Ergebnis
ExitLoop
EndIf
_OrdnerRekursiv($sPfad)
WEnd
EndFunc ;==>_OrdnerRekursiv
Vielen Dank für eure Antwort
Aquaplant