Dbyte
Technical User
- Mar 6, 2002
- 87
Here is my code:
This is part of a larger script that searches recursively thru all index.dat files & pulls URLs accessed by a user. The subroutine above was pulling all URLs regardless of date until I added the highlighted lines. Now I get no URLs.
I don't know if the problem is here or that the binary values for the dates aren't being converted to strings correctly. If someone can confirm for me that my highlighted entries are sound I'll look into the binary-to-string issue.
Code:
Sub FindLinks(strMatchPattern, strPhrase, file)
Dim oRE, oMatches, oMatch, dt, start, sArray, timeStamp, url, sToday
Set oRE = New RegExp
oRE.Pattern = strMatchPattern
oRE.Global = True
oRE.IgnoreCase = False
Set oMatches = oRE.Execute(strPhrase)
[highlight]sToday = CDate(Date)[/highlight]
For Each oMatch In oMatches
start = Instr(oMatch.FirstIndex + 1,strPhrase,": ")
If start <> 0 Then
sArray = Split(Mid(strPhrase,start+2),"@")
url=Left(sArray(1),InStr(sArray(1),chr(0)))
dt=AsciiToHex(Mid(strPhrase,oMatch.FirstIndex+1+16,8))
timeStamp = cvtDate(dt(7)&dt(6)&dt(5)&dt(4),dt(3)&dt(2)&dt(1)&dt(0))
[highlight]If timeStamp = sToday Then[/highlight]
oTextStream.WriteLine "<tr><td nowrap><font color=green size=2>"&sArray(0)&"</font></td>"+"<td nowrap><font color=red size=2> "&timeStamp&"</font></td>"&"<td nowrap><font size=2> <a href="&url&">"&url&"</a></font></td></tr>"
[highlight]End If[/highlight]
End If
Next
End Sub
I don't know if the problem is here or that the binary values for the dates aren't being converted to strings correctly. If someone can confirm for me that my highlighted entries are sound I'll look into the binary-to-string issue.