Help with VBScript Timer



I need to write a script that will time the download and upload of different
size files or folders to a NAS.
I am trying to put together data on upload and download times from different
loactions.
Here is what I have so far. It download the file but never finishes the timer.
Is there an easy way to do this.

Thanks in Advance

Dim WshShell,fso
Dim LOGFILENAME



Dim cnt

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const FILELOGPATH =
"c:\commonlog\applications\consolidated\download_timer.log"
Const ERRORLOGPATH =
"C:\commonlog\applications\consolidated\download_timer_error.log"
'-----------------------------
'CREATE OBJECTS FOR LATER USE
'-----------------------------
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set evar = wshshell.environment("Process")
Set WshNet = WScript.CreateObject("WScript.Network")

'To keep script from failing on error
'On Error Resume Next
'---------------------------
'Main
'---------------------------



Dim conn,conStr,conSoft,strSQL,rs,StartTime,c
'Open error log
Set ErrorLog = fso.OpenTextFile(ERRORLOGPATH,ForAppending,True)

StartTime = Timer
'------------------------

fso.CopyFolder "\\<servername>\<sharename>\<folder>", "c:\temp\"



'------------------------

If Err <>0 Then
msg = "An error occurred while trying to create the recordset:" & Err &
vbCrLf 'Create an understandable error msg
msg = msg & "Error number: " & Err & vbCrLf
msg = msg & "Description: " & Err.Description
Wscript.Echo msg
WshShell.Popup msg,3, "Error Pulling Records!",64
ErrorLog.writeline "<ScriptName>: " & Err.Description & " " & Now() & " "
& FormatNumber(Timer - StartTime,2)
Else
wscript.echo "Recordset created successfully."
ErrorLog.writeline "<ScriptName>: Completed Successfully " & Now() & " " &
FormatNumber(Timer - StartTime,2)
End If
.



Relevant Pages

  • Re: unzip a file on webserver
    ... the reason why I didn't want to download it is because the .zip ... | a script to unzip that file and keep it up to date. ... so the only options I can think of are ASP and javascript. ... We do have the ASP upload component on our webserver, ...
    (microsoft.public.frontpage.programming)
  • Forcing a download in asp results in zero bytes file
    ... I'm a JScript user, but this time I've a problem with someone else ... using the script I join to ... with this very pdf, it results in a zero byte download. ... Dim strAbsFile ...
    (microsoft.public.scripting.vbscript)
  • Re: multiple publishers script/program
    ... > upload articles and download articles to add to them ammend them etc., ... > suitable than having to upload and download using ftp.... ... > know of a php script that would do the job or another program. ...
    (alt.php)
  • error downloading .pdf from SQL database
    ... thanks to some smart/helpful people here my upload and download ... As users upload attachments, a datagrid appears with the option to ... Dim sFileName As String, i As Integer ...
    (microsoft.public.dotnet.framework.aspnet)
  • QTOFileManager V 1.0<== Remote File Upload Vulnerability
    ... Script: Sava's Simple Upload Version: Final ... Download:http://www.qto.com/fm/QTOFileManager1.0.zip ... WebSite: http://wwe.hostwq.net ...
    (Bugtraq)