Free for PREMIUM members
Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
strFolder = "C:\TEMP\Temp\Test script\Excel"
strResultFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Results.xls"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objExcel = CreateObject("Excel.Application")
Const xlUp = -4162
objExcel.Visible = True
objExcel.ScreenUpdating = False
Set objResultWB = objExcel.Workbooks.Add
For Each objFile In objFSO.GetFolder(strFolder).Files
If Left(LCase(objFile.Name), 3) = LCase("Log") And Right(LCase(objFile.Name), 4) = LCase(".xls") And LCase(objFile.Name) <> LCase(strResultFile) Then
intRow = objResultWB.Sheets(1).Cells(65536, "C").End(xlUp).Row
If intRow > 1 Then intRow = intRow + 1
Set objSourceWB = objExcel.Workbooks.Open(objFile.Path, False, False)
objSourceWB.Sheets(1).Range("C1:C" & objSourceWB.Sheets(1).Cells(65536, "C").End(xlUp).Row).Copy objResultWB.Sheets(1).Range("C" & intRow)
objExcel.DisplayAlerts = False
objResultWB.SaveAs strResultFile, True
objExcel.DisplayAlerts = True
objExcel.ScreenUpdating = True
Open in new window
Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.