Hello
I was able to use ReadString() to capture the output of "show running-config" command and save it into the file using objFile.WriteLine.
However the very first line in the text file included the command.
Is there way not to include the command in the text file?
Code:
Dim objTab, szCommand
Set objTab = crt.GetScriptTab
szCommand = "show cur"
objTab.Screen.Send szCommand & chr(13)
objTab.Screen.WaitForString vbCr
Dim strResult, objFile
strResult = objTab.Screen.ReadString ("return",3)
Set objFile = g_fso.OpenTextFile("c:\temp\config_sample.txt", ForWriting, True)
objFile.WriteLine strResult
objFile.Close
Thank you
Samky2005