"Command Prompt" usage

B

BoazBoaz

How do I use the ""Command Prompt" commands to do:

Every 5 seconds :
1) show: netstat -no
2) show: tasklist /svc
3) all of that into a log file
 
P

Pegasus \(MVP\)

BoazBoaz said:
How do I use the ""Command Prompt" commands to do:

Every 5 seconds :
1) show: netstat -no
2) show: tasklist /svc
3) all of that into a log file
Run this batch file:

@echo off
:again
echo %date% %time:~0,8% >> c:\log.txt
netstat -no >> c:\log.txt
tasklist /svc >> c:\log.txt
echo. >> c:\log.txt
ping localhost -n 6
goto again
 
B

BoazBoaz

Thank you Very much

Pegasus (MVP) said:
Run this batch file:

@echo off
:again
echo %date% %time:~0,8% >> c:\log.txt
netstat -no >> c:\log.txt
tasklist /svc >> c:\log.txt
echo. >> c:\log.txt
ping localhost -n 6
goto again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top