Hi @ all
Ich hab mal wieder ein kleines Problem
Ich wollte mir alle Verknüpfungen die auf der Festplatte existieren in ein Array haun und benutze dafür die _RecursiveFileListToArray-Funktion von Oscar :
Spoiler anzeigen
Func _RecursiveFileListToArray($sPath, $sPattern, $iFlag = 0, $iFormat = 1, $sDelim = @CRLF)
Local $hSearch, $sFile, $sReturn = ''
If StringRight($sPath, 1) <> '\' Then $sPath &= '\'
$hSearch = FileFindFirstFile($sPath & '*.*')
If @error Or $hSearch = -1 Then Return SetError(1, 0, $sReturn)
While True
$sFile = FileFindNextFile($hSearch)
If @error Then ExitLoop
If StringInStr(FileGetAttrib($sPath & $sFile), 'D') Then
If StringRegExp($sPath & $sFile, $sPattern) And ($iFlag = 0 Or $iFlag = 2) Then $sReturn &= $sPath & $sFile & '\' & $sDelim
$sReturn &= _RecursiveFileListToArray($sPath & $sFile & '\', $sPattern, $iFlag, 0)
ContinueLoop
EndIf
If StringRegExp($sFile, $sPattern) And ($iFlag = 0 Or $iFlag = 1) Then $sReturn &= $sPath & $sFile & $sDelim
WEnd
FileClose($hSearch)
If $iFormat Then Return StringSplit(StringTrimRight($sReturn, StringLen($sDelim)), $sDelim, $iFormat)
Return $sReturn
EndFunc
So hab ich den Aufruf gemacht :
[autoit]_RecursiveFileListToArray ('C:','\.Ink\z',1)
[/autoit]
Aber bekomme ein leeres Array
Mit
_RecursiveFileListToArray ('C:','\.au3\z',1)
[/autoit]
klappt es
Hoffe ihr könnt helfen