I'm trying to schedule a batch that executes and logs netstat -abn, but also filters the results while keeping the same contents of the original log, basically updating the log.
For example: right now it logs all of the results, including items I don't care for, such as connections established with AV software and my web browser; and everytime it's done, of course it replaces the old log with the new results.
It's a little more complex than I've gotten with DOS, and so far I've gone through trying to include the FOR command to filter through the log/command output, but I haven't figured out (if even possible) how to remove the lines that show the connections I don't need. I've also gone through using SET to put in some variables, but like I said it's a little more complex than I've don't with dos.
I apologize I don't have any command strings I've tried so far, but if someone could point me in the right direction that would be great. Thanks
*Edit: Answered my own q, messed around some more with piping and FIND /v /i to filter it to exactly what I need.
Need help trying to create an updated and filtered log
Moderator: DosItHelp
-
- Posts: 319
- Joined: 12 May 2006 01:13