Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem @echo off
- if "%1" == "" goto error
- if "%1" == "sec" goto sec
- if "%1" == "pro" goto pro
- if "%1" == "nl" goto nl
- if "%1" == "nl2" goto nl2
- goto error
- :sec
- rem Add section title
- if "%2" == "" goto error
- set "title=%2"
- setlocal
- set "frame=%title% ============================================================="
- echo.%frame:~60%>> log.txt
- echo.=%title%=>> log.txt
- echo.%frame:~60%>> log.txt
- endlocal
- echo. >> log.txt
- goto end
- :pro
- rem Add program title
- if %2 == "" goto error
- set "title=%2"
- setlocal
- set "frame=%title% ============================================================="
- echo.%frame:~60%>> log.txt
- echo.=%title%=>> log.txt
- echo.%frame:~60%>> log.txt
- endlocal
- echo. >> log.txt
- goto end
- :nl
- rem New Line
- echo. >> log.txt
- goto end
- :nl2
- rem New Line x2
- echo. >> log.txt
- echo. >> log.txt
- goto end
- :error
- echo. >> log.txt
- echo bad log.cmd usage >> log.txt
- :end
Advertisement
Add Comment
Please, Sign In to add comment