Created
December 6, 2012 22:49
-
-
Save davidruhmann/4229197 to your computer and use it in GitHub Desktop.
[Batch] Log a message to a file and or the screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:Log <xLog> <xMessage> [xParrot] [xSession] | |
:: Append the message with a timestamp out to the specified log file and repeat | |
:: the message to the display if xParrot is set to 1. | |
if not "%~1"=="" if exist "%~1" echo.%Date% %Time% %~4: %~2 >> "%~1" | |
if /i "%~3"=="1" echo.%~2 | |
goto :eof | |
:: by David Ruhmann |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment