[windows2000] Re: Copying a file to a network location

  • From: "Freitas, Eduardo" <Eduardo.Freitas@xxxxxxxxxxxxx>
  • To: "'windows2000@xxxxxxxxxxxxx'" <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 13 May 2004 11:15:10 -0500

I tried the following code:

  For Each objLogfile in colLogFiles
      errBackupLog = objLogFile.BackupEventLog("P:\it\logs\" & strLogName &
"_" & 

"App.evt")
      If err.number > 0 then
        WScript "Erro " & err.number & ": " & err.description
        Err.Clear
      Else
        If errBackupLog <> 0 Then        
          Wscript.Echo "The Application event log could not be backed up."
        Else
          objLogFile.ClearEventLog()
        End IF
      End If
  Next

Apparently the only condition that is true is errBackup <> 0 because that's
the only part that gets executed.

Regards,

Eduardo 

-----Original Message-----
From: Sullivan, Glenn [mailto:GSullivan@xxxxxxxxxxxxxx] 
Sent: quinta-feira, 13 de maio de 2004 10:29
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] Re: Copying a file to a network location

How about capturing the error number?

Change, temporarily, that code to:

on error resume next
  For Each objLogfile in colLogFiles
      errBackupLog = objLogFile.BackupEventLog("C:\EVT\" & strLogName & "_"
& "App.evt")
        if err.number>0 then
                wscript.echo "Error # " & err.number 
                wscript.echo "Description " & err.description
      Else
          objLogFile.ClearEventLog()
      End If
  Next  

Glenn Sullivan, MCSE+I  MCDBA
David Clark Company Inc. 

-----Original Message-----
From: windows2000-bounce@xxxxxxxxxxxxx
[mailto:windows2000-bounce@xxxxxxxxxxxxx]On Behalf Of Freitas, Eduardo
Posted At: Thursday, May 13, 2004 9:23 AM
Posted To: Windows 2000
Conversation: [windows2000] Re: Copying a file to a network location
Subject: [windows2000] Re: Copying a file to a network location


Ray,

The error message is "The Application event could log could not be backed
up."

-------------------------code---------------------------------

  For Each objLogfile in colLogFiles
      errBackupLog = objLogFile.BackupEventLog("C:\EVT\" & strLogName & "_"
& "App.evt")
      If errBackupLog <> 0 Then        
          Wscript.Echo "The Application event log could not be backed up."
      Else
          objLogFile.ClearEventLog()
      End If
  Next

Regards,

Eduardo


 
-----Original Message-----
From: Ray at work [mailto:listray@xxxxxxxxxx] 
Sent: quinta-feira, 13 de maio de 2004 09:54
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] Re: Copying a file to a network location

What is the error that you get?

Ray at work


> -----Original Message-----
> From: Freitas, Eduardo
> 
> Can't get to works as in:
> 
> errBackupLog = objLogFile.BackupEventLog("P:\" & strLogName & "_" &
> "App.evt")


********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm
********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm
********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm
********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: