Computing.Net > Forums > Windows XP > Batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file

Reply to Message Icon

Name: Sebastian42
Date: August 19, 2009 at 03:41:42 Pacific
OS: WinMe
CPU/Ram: 2GHz; 1Gb
Product: Asustek / P4S800MX
Subcategory: General
Comment:

In 'Select Category' there is no WinMe option, so I just chose one.

Can this be put into a batch file ? If so, how ?
Go to Start->Run and type CMD [OK], type: netstat -a [ENTER]

Basty



Sponsored Link
Ads by Google

Response Number 1
Name: Ewen
Date: August 19, 2009 at 15:42:11 Pacific
Reply:

Post this in the Programming Forum on the right

http://ewen.uuuq.com/


0

Response Number 2
Name: Matt (by Mattio)
Date: August 19, 2009 at 16:31:39 Pacific
Reply:

Easy.

Open Notepad
Type Netstat -a
Save as .Bat
Easy!

You don't have to open in CMD or nothing, A batch file runs in DOS automatically. So whatever you type in there, it automatically runs with CMD.

So just typing Netstat -a will do it

Matt

***************************
Need BatchFile Help ?
Msg me :)
***************************


0

Response Number 3
Name: Sebastian42
Date: August 20, 2009 at 05:33:22 Pacific
Reply:

Mattio
The ground has shifted. Your suggestion works perfectly, but the
usefulness of it has evaporated. When I tried it in RUN, before posting the question, I got a sensible (though unintelligible) set of data in the DOS window. Now, from both the batch file and from RUN, I get an infinite number of repeats of 'C:\Desktop>Netstat -a'

Basty


0

Response Number 4
Name: Sebastian42
Date: August 20, 2009 at 05:37:22 Pacific
Reply:

P.S. I 'googled' Netstat and got this result :
A possible batch file is:

@echo off
for /L %%X in (1,1,100) do (netstat -b >> C:\connections.txt)&(sleep 5)
Cls

This example does 100 iterations of the netstat command at 5 second intervals (and records the results in a log).

Basty


0

Response Number 5
Name: Sebastian42
Date: August 20, 2009 at 05:40:25 Pacific
Reply:

I just ran that batch file and the result was 'syntax error'.

The example had been found on http://commandwindows.com/netstat.htm

Basty


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batch file

Batch file www.computing.net/answers/windows-xp/batch-file/180885.html

Auto folder Batch file www.computing.net/answers/windows-xp/auto-folder-batch-file/145055.html

simple batch file www.computing.net/answers/windows-xp/simple-batch-file/149160.html