Home > Posts > Redirecting output of batch file from the inside

Redirecting output of batch file from the inside

Calling a label in a batch file is useful to redirect (for logging) the output of the batch file to a file from inside that same batch file, without needing to author a separate batch file to do the redirect of standard output.

@echo off

call :process > update_cxml.log
goto :EOF

:process

(Revised previous version of this post)

Categories: Posts Tags: , , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.