Hi I need to find out how to show on 1 line of text in a file
TCP | Local IP | Remote IP | ESTABLISHED | ELAPSED TIME
i can manage to do it all apart from getting the elapsed time with the following bat file
@ECHO OFF
SET _file=%~n1%
SET _pathname=%~f1%
SET _ext=%~x1%
FOR /f "tokens=6-8 delims=/ " %%G IN ('NET TIME \\%computername%') DO (
SET _mm=%%G
SET _dd=%%H
SET _yy=%%I
)
FOR /f "tokens=1,2 delims=: " %%G IN ('time/t') DO (
SET _hr=%%G
SET _min=%%H
)
NETSTAT -n | find "3389"| find "ESTABLISHED"> C:\conn\%computername%.csv
EXIT
Can anyone help me please