Netstat from Desktop Shortcut

T

Tosca

Hello everyone

I'm not sure if this should be here, so if I'm mistaken, I apologise and
would be grateful for advice where this should be posted.

I have XP Pro and a batch file which I run from a Desktop Shortcut. The
output from Netstat is appended to a text file. Is it possible to get a
date and time stamp added to the batch file at the beginning of the Netstat
output so I have a permanent record of what was happening and when?

The batch file is:
REM append netstat output to Fport.txt
REM but need to modify it to give date/time stamp each time it's run
netstat -an >> "c:\Documents and Settings\Administrator\Desktop\Fport.txt"
REM append Fport output to Fport.txt
c:\WINNT\system32\cmd.exe /c c:\Fport -p >> "c:\Documents and
Settings\Administrator\Desktop\Fport.txt"
REM open Fport.txt
"c:\Documents and Settings\Administrator\Desktop\Fport.txt"
Thank you for your time and patience.
 

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