#include <File.au3>
; CSV Datei wird in ein array eingelesen
; --------------------------------------
Dim $arCSV
$csvFile = "test.csv"
_FileReadToArray ( $csvFile , $arCSV )
For $i = 1 To $arCSV[0]
$arCSV[$i] = StringSplit($arCSV[$i], ";")
Next
For $j = 1 To $arCSV[0]
$x = $arCSV[$j]
MsgBox(0,'', 'Anzahl dert Elemente von $arCSV[3]: ' & $x[5])
; Dateiname wird erzeugt
;-----------------------
$tag = @MDAY
$monat = @MON
$jahr = @YEAR
$std = @HOUR
$min = @MIN
$sek = @SEC
$bs = "-"
$Datum = $tag & $bs & $monat & $bs & $jahr & $bs & $std & $bs & $min & $bs & $sek
$dbegin = "descr"
$dendung = ".txt"
$dname = $dbegin & $Datum & $dendung
; Datei wird erzeugt
; ------------------
_FileCreate($dname)
; Erzeugte Datei wird geöffnet und Stellen aus der 1. Datei werden
; hinzugefügt
; ---------------------------------------------------------------
$file = FileOpen( $dname , 1)
; Check if file opened for writing OK
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
FileWriteLine($file, "Line1")
FileWriteLine($file, "Line2" & @CRLF)
FileWriteLine($file, $x[5] )
FileClose($file)
Next