Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Still having output issues

Status
Not open for further replies.

LSIGuy

MIS
Jun 26, 2002
18
US
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!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top