forked from Pahiro/AutoIT-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Zurich.au3
39 lines (36 loc) · 999 Bytes
/
Zurich.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <File.au3>
_filelist('C:\TEMP\Test')
Func _filelist($searchdir)
Dim $Data
$search = FileFindFirstFile($searchdir & "\*.*")
If $search = -1 Then return -1
While 1
$file = FileFindNextFile($search)
If @error Then
FileClose($search)
return
Elseif $file = "." or $file = ".." Then
ContinueLoop
ElseIf stringinstr(FileGetAttrib($searchdir & "\" & $file),"D") then
_filelist($searchdir & "\" & $file)
EndIf
If stringinstr($file, ".txt") Then
;~ ConsoleWrite($searchdir & "\" & $file & @crlf )
$oFile = FileOpen($searchdir & "\" & $file, 0)
While 1
$line = FileRead($file)
ConsoleWrite($line)
If @error = -1 Then ExitLoop
If StringLeft($line, 2) = 'DL' Then
$Data &= $line & @CRLF
ConsoleWrite($line & @CRLF)
ElseIf StringLeft($line, 2) = 'DD' Then
$Data &= $line & @CRLF
ConsoleWrite($line & @CRLF)
EndIf
Wend
FileClose($oFile)
;~ ConsoleWrite($Data)
EndIf
WEnd
EndFunc