"Copy and Delete of IIS Logs" question...

Author Message
mtw999

  • Total Posts : 29
  • Scores: 0
  • Reward points : 0
  • Joined: 8/22/2011
  • Status: offline
"Copy and Delete of IIS Logs" question... Tuesday, January 24, 2012 5:32 AM (permalink)
0
Here is a piece of a script I have:
 
For Each objFile2 in colFiles
     If LCase(Left(objFile2.FileName, 2)) = "ex" And LCase(objFile2.Extension) = "log" Then
          strCopy = "C:\logs\weblogs\" & strNewFolder & "\" & objFile2.FileName & "." & objFile2.Extension
          If Not objFSO.FileExists(strCopy) Then    
               objFile2.Copy(strCopy)
          Else
               bError = true
               Set objLogFile = objFSO.OpenTextFile("E:\logs\weblogs\" & strDate & "_Error Log.txt", ForAppending, True)
               objLogFile.Write "File " & strCopy & " already exists!"
               objLogFile.Writeline
               objLogFile.Close
          End If
     End If
Next
 
...what I want to do is after the file is copied, verify the file copied and then delete the original.
 
Anyone got an elegant way to tie that into this piece of code?
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9