Rob van der Woude's Scripting Pages

Help text for IsRedirected.cs

(view help text of IsRedirected.cs as plain text)

IsRedirected,  Version 1.01
Detect redirection of StdIn, StdOut and/or StdErr
(Standard Input, Standard Output and Standard Error respectively)

Usage:  ISREDIRECTED  [ /I | /O | /E ]

Where:  /I   returns result for StdIn  redirection only (default: all)
        /O   returns result for StdOut redirection only
        /E   returns result for StdErr redirection only

Note:   The result is returned as "errorlevel", where
        no redirection = 0, command line error = 1
        redirected StdIn = +2, StdOut = +4, StdErr = +8

Check for redirection by Hans Passant on StackOverflow.com
/questions/3453220/how-to-detect-if-console-in-stdin-has-been-redirected

Written by Rob van der Woude
http://www.robvanderwoude.com

page last uploaded: 2017-03-25, 21:31