All, I have a HTA script which is used to copy files from one server to another. When the copying starts it loops to several server names and creates a log line when the copying starts and when the copying ends. I want to update a row on the screen everytime a logline is written. This is the sub which creates the log:
Sub CreateLog(sLogLine)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim oFSO, sLogFile
Set oFSO = CreateObject("Scripting.FileSystemObject")
sScriptPath = Replace(location.pathname,"%20"," ")
sScriptPath = oFSO.GetParentFolderName(sScriptPath)
if not oFSO.FileExists(sScriptPath & "\nalfilecopy.log") then
oFSO.CreateTextFile(sScriptPath & "\nalfilecopy.log")
end if
set sLogFile = oFSO.OpenTextFile(sScriptPath & "\nalfilecopy.log", ForAppending)
sLogFile.WriteLine Now() & " - " & sLogLine
LogLine.InnerHTML = Now() & " - " & sLogLine
sLogFile.close
End Sub
the LogLine.InnerHTML should update also, but this doesn't happen, it only updates when everything is finished so you only see the last message. I want it to update everytime.
Thanks in advance