Skip to main content

hi all need a lil help with batch files

More
18 years 4 months ago #15470 by nibsa
h all i know this is a noob thing to ask but im a noob at proggram in any lang but am trying to learn vb and batch but need a lil help


im trying to make a batch file that will run the command in xp pro netstat -e or -n or -na and such and save this info to a text file

i tryed


c:\>windows\command netstat -e >> test.txt but unable to make it work if any one could plz help i would be very thankful


thanks ,
nibsa
More
18 years 4 months ago #15473 by Arani
Replied by Arani on topic batch files
create the batch file to the specifications you need. and then save it as..filename.bat
this will help you to run it as a batch file. if you save it as a txt file which is text file, it wont run
any problems let us know

Picking pebbles on the shore of the networking ocean
More
18 years 4 months ago #15479 by nibsa
Replied by nibsa on topic hi sorry
hi im sorry i dont think i made it clear eng. on what i am trying to do so let me try again.


ok i want to make a batch file that when ran it would open up command screen "cmd screen" and then auto give command netstat - e and then save the output to whatevername.txt i hope this help a lil sorry
More
18 years 4 months ago #15480 by FallenZer0
@echo off
netstat -[options] >> whateverfile.txt

-There Is A Foolish Corner In The Brain Of The Wisest Man- Aristotle
More
18 years 4 months ago #15483 by Arani
Replied by Arani on topic batch files
yes whatever fallenzero said, put that in the autoexec file. that will make the commands be executed on startup of the system

Picking pebbles on the shore of the networking ocean
More
18 years 4 months ago #15484 by Arani
Replied by Arani on topic batch files
and if your system runs xp, here are the instructions
support.microsoft.com/?kbid=314488

Picking pebbles on the shore of the networking ocean
Time to create page: 0.132 seconds