Break on
;Read the entire file into memory. Change the path to fit your setup.
$file = ReadFile("c:\found.txt")
;Do the magic on each separate line.
For Each $line in $file
;Check to see if the line starts with DomainName\. Change this to fit your setup.
;Also change the 11 to match the number of characters for your domain + a \.
If Left($line, 11) = "Domainname\"
;Split the line on the \.
$line = Split($line, "\")
;Display the last element of the array you just created by splitting the line.
? $split[UBound($split)]
EndIf
Next
;Function ReadFile()
;
;Author Radimus
;
;Contributors Lonky... This is basically his code that I trimmed down to its
; simplest function
;
;Action Reads a file into an array
;
;Syntax $array=ReadFile($file)
;
;Version 1.0.1
;
;Date 10/21/2003
;
;Date Revised 10-22-2003 - dimmed vars
;
;Parameters file
; source filename
;
;Remarks Pair this with WriteFile() to read and write an entire file easily
;
;Returns @error if failed
;
;Dependencies None
;
;KiXtart Ver 4.02
;
;Example(s) $array=ReadFile('c:\file.txt')
Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf = Chr(10)
$f = FreeFileHandle
$_ = Open($f, $file)
If @error Exit @error EndIf
Do $t = $t + $lf + ReadLine($f) Until @error
$_ = Close($f)
$ReadFile = Split(SubStr($t, 2), $lf)
EndFunction