Code: Select all
:: Preliminary streams redirection.
:: Published on 09.12.2012 by Alex Dragokas.
@echo off
:: All future streams #1, #2 will be redirerect to a file 'out.txt'
echo. 1>&3 2>&4 3>out.txt 4>&3
:: testing StdOut (descriptor #1)
Echo testing
:: imitation StdErr (descriptor #2)
copy zz:\
:: try StdIn
set /p "some=Your input: "
:: show message on console (without redirection)
pause>con