1.

Solve : How to not to logg all Information?

Answer»

With this command

For /F %%i IN ('Type IPlist.txt') DO (
Echo FINGERING %%i >> %IPADDR%Process.log
If NOT %%i=="" finger [emailprotected]%%i >> Fingerout.log
)

I am logging a file for the Finger cmd on and IP List.
Printers will be the only IP Addresses that will reply to this cmd and PC will simply refuse connection.

I'm looking for a WAY to say IF "Conection = Refused" Do not INCLUDE in log. I only want the Printers to log info.

Any advice Advice? Sure. Use a pipe to send the output of the finger command to the FIND command and use "refused" as the search argument. Then CHECK the errorlevel (aka exit code). 1 = not found, 0 = found.

Good luck.



Discussion

No Comment Found