I am running the following script that was pasted from pasted from Chapter 3 of the SAM Eval Guide.
It is in the section showing how to use scripts to measure large directories.
However I seem to have a bug in the script:
Dim folderPathfolderPath = WScript.Arguments(0)
Set fs = WScript.CreateObject ("Scripting.FileSystemObject")
Set folder = fs.GetFolder(folderPath)
WScript.Echo "Message: Folder " & folderPath & " is " & folder.Size & " bytes large"
WScript.Echo "Statistic: " & folder.Size
Gives me the error:
Get Output Failed:
C:\ProgramData\SolarWinds\Orion\temp\f2fe2dd0-1548-4f65-8cfe-0407d9dfa94a(1, 26) Microsoft VBScript compilation error: Expected end of statement
If I run the script outside of Solarwinds I get this error:
C:\temp\dir-size.vbs(1, 26) Microsoft VBScript compilation error: Expected end of statement
Whare is the bug in my script?