#1
|
|||
|
|||
save in the text file
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 Last edited by cboyack; 10-20-2020 at 12:50 PM. Reason: Please use [CODE] and [/CODE] tags to denote code strings |
Tags |
readstring , save to a file |
Thread Tools | |
Display Modes | Rate This Thread |
|
|