By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,499 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

Refresh HTA row after file copy

P: 1
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
Mar 23 '07 #1
Share this Question
Share on Google+
1 Reply


P: 1
Change this line:
LogLine.InnerHTML = Now() & " - " & sLogLine

To:
LogLine.InnerHTML = LogLine.InnerHTML & Now() & " - " & sLogLine
Feb 26 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.