Spoiled for choice here, but I've had some help with the scripting.
Mark, I had errors running your script. I think bpimagelist with the -L parameter produces the output in a nice list, but not sure if your code accounts for that and is expecting one long line of output? Anyway, it bombed out.
I've got this slighted modified version which appears to do the trick;
Const ForReading = 1
Dim arrOutput(7)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\imagelist.txt", ForReading)
Set objOutput = objFSO.CreateTextFile("C:\imagelist.csv")
objOutput.WriteLine "Client Name,Policy,Schedule Label,Backup Date,Expiry Date,Backup Size(KB),Schedule Type,Copies"
Do Until objFile.AtEndOfStream
boolEmpty = TRUE
arrFields = Split(objFile.ReadLine, ": ")
If UBound(arrFields) => 1 then
If arrFields(0) = "Client" Then arrOutput(0) = Trim(arrFields(1))
If arrFields(0) = "Policy" Then arrOutput(1) = Trim(arrFields(1))
If arrFields(0) = "Sched Label" Then arrOutput(2) = Trim(arrFields(1))
If arrFields(0) = "Backup Time" Then arrOutput(3) = Trim(Left(arrFields(1), Instr(arrFields(1), " (")))
If arrFields(0) = "Expiration Time" Then arrOutput(4) = Trim(Left(arrFields(1), Instr(arrFields(1), " (")))
If arrFields(0) = "Kilobytes" Then arrOutput(5) = Trim(arrFields(1))
If arrFields(0) = "Schedule Type" Then arrOutput(6) = Trim(Left(arrFields(1), Instr(arrFields(1), " (")))
If arrFields(0) = "Number of Copies" Then arrOutput(7) = Trim(arrFields(1))
End If
For Each strElemenent in arrOutput
If strElemenent = vbEmpty Then
boolEmpty = TRUE
Exit For
End If
boolEmpty = FALSE
Next
If Not boolEmpty Then
For intCount = LBound(arrOutput) To UBound(arrOutput)
If intCount = UBound(arrOutput) Then
strOutput = strOutput & arrOutput(intCount)
Else
strOutput = strOutput & arrOutput(intCount) & ","
End If
arrOutput(intCount) = vbEmpty
Next
objOutput.WriteLine strOutput
strOutput = ""
End If
Loop
objFile.Close
objOutput.Close
Work is still required but its coming along nicely thanks to you.