I was instructed that in order to transfer a cmd prompt command's output to a useable txt file, I needed to make a .bat file that would run this command for me.
I started with an open statement...
i.e.
Open ("c:\dump1.bat" For Output As #1
Then I wrote the bat file...
i.e.
Print #1, "c:\ping " & Host & " >c:\dump1.txt"
Then I ran it...
Shell ("c:\dump1.bat"
It succesfully created dump1.txt but it was blank. The ping function takes a few seconds, but the cmd prompt screen was open only a fraction of a second. Is it not copying the output because the screen is closing too fast? How can I get this info to copy correctly? Please help!
I started with an open statement...
i.e.
Open ("c:\dump1.bat" For Output As #1
Then I wrote the bat file...
i.e.
Print #1, "c:\ping " & Host & " >c:\dump1.txt"
Then I ran it...
Shell ("c:\dump1.bat"
It succesfully created dump1.txt but it was blank. The ping function takes a few seconds, but the cmd prompt screen was open only a fraction of a second. Is it not copying the output because the screen is closing too fast? How can I get this info to copy correctly? Please help!