hi, kurze frage .Warum geht das nich ?
[autoit]#Include <File.au3>
[/autoit][autoit][/autoit][autoit]$filelist = _FileListToArray(@ScriptDir & "\File\")
if $filelist[0] = 0 Then
;...
;...
ElseIf $filelist[0] <> 0 Then
;...
;...
EndIf
hi, kurze frage .Warum geht das nich ?
[autoit]#Include <File.au3>
[/autoit][autoit][/autoit][autoit]$filelist = _FileListToArray(@ScriptDir & "\File\")
if $filelist[0] = 0 Then
;...
;...
ElseIf $filelist[0] <> 0 Then
;...
;...
EndIf
Hi lass dir mal in einer MsgBox deinen _FileListToArray String ausgeben.
msgbox(0,"Test",@ScriptDir & "\File\")
;bestimmt sind die Backslashes bei File zuviel.
MfG
Der_Doc
hatte ich schon probiert er meckert bei
if $filelist[0] = 0 Then
if $filelist^ ERROR
das ist höchstwahrscheinlich kein gültiger pfad:
[autoit]
@ScriptDir & "\File\"
Edit: sry hier stand müll
Hallo M☻x,
versuch es einmal so:
[autoit]#Include <File.au3>
#include <array.au3>
$filelist = _FileListToArray(@ScriptDir & "\Files\")
if Not IsArray($filelist) Then
MsgBox(0,"","Nichts gefunden")
;...
Else
_ArrayDisplay($filelist)
;...
EndIf
denn entweder ist der Pfad ungültig oder enthält weder Dateien noch Ordner,
Schnitzel die Pfadangabe ist korrekt als 1. Parameter, der Filter kommt erst an 2. Stelle (default = *),
mfg (Auto)Bert
ahh cool danke xD
_FileListToArray gibt im Fehlerfall Null zurück, also kannst Du nicht auf $filelist[0] prüfen, da es das Array nicht gibt.
Du musst If IsArray($filelist) Then... benutzen.
Edit: zu langsam...
danke euch allen