This By Request VBS script will allow you to hard code a Universal Naming Convention (UNC) path to your Bad DDRs and Bad Mifs directory folders and count the number of root files in each and send the results to excel.
VBS Script:
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set BAD_DDRS = oFSO.GetFolder("\\SiteServerName\SMS_XXX\inboxes\ddm.box\BAD_DDRS")
Set oFiles1 = BAD_DDRS.Files
Set BADMIFS = oFSO.GetFolder("\\SiteServerName\SMS_XXX\inboxes\auth\dataldr.box\BADMIFS")
Set oFiles2 = BAD_DDRS.Files
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add
intRow = 2
objExcel.Cells(1, 1).Value = "Bad DDR's Count"
objExcel.Cells(1, 2).Value = "Bad Mifs Count"
objExcel.Cells(intRow, 1).Value = oFiles1.Count
objExcel.Cells(intRow, 2).Value = oFiles2.Count
intRow = intRow + 1
objExcel.Range("A1:B1").Select
objExcel.Selection.Interior.ColorIndex = 19
objExcel.Selection.Font.ColorIndex = 11
objExcel.Selection.Font.Bold = True
objExcel.Cells.EntireColumn.AutoFit
MsgBox "Done"
No Comments