Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  Backup  Files  

 Content of List Backup Files.vbs
MD5 Hash: D88D3FD237732B1433F3BF1524C3E057
' Description: Lists all IIS backup files found on the local computer.


On Error Resume Next

Const MD_BACKUP_NO_MORE_BACKUPS = &H80070103
strComputer = "."

Set objWMIService = GetObject _
("winmgmts:{authenticationLevel=pktPrivacy}\\" _
& strComputer & "\root\microsoftiisv2")

Set objComputer = _
objWMIService.Get("IIsComputer.Name='LM'")

intIndex = 0

Do While True
strName = ""
objComputer.EnumBackups strName, intIndex, _
strVersion, strDateTime
If (Err.Number <> 0) Then
If (Err.Number = MD_BACKUP_NO_MORE_BACKUPS) Then
Exit Do
End If
End If

dtDate = DateSerial(Mid(strDateTime, 1, 4), _
Mid(strDateTime, 5, 2), Mid(strDateTime, 7, 2))
dtTime = TimeSerial(Mid(strDateTime, 9, 2), _
Mid(strDateTime, 11, 2), Mid(strDateTime, 13, 2))
strFmtDateTime = FormatDateTime(dtDate) & " " & _
FormatDateTime(dtTime, vbLongTime)

WScript.Echo "Name: " & strName
Wscript.Echo "Version Number: " & strVersion
Wscript.Echo "Backup Date: " & strFmtDateTime

intIndex = intIndex + 1
Loop

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a