batch-fileInput and output redirection


Syntax

  • [command] [[> | >> | < | 2> | 2>>] file]
  • [[> | >> | < | 2> | 2>>] file] [command]

Parameters

ParameterDetails
commandAny valid command.
>Write STDOUT to file.
>>Append STDOUT to file.
<Read file to STDIN.
2>Write STDERR to file.
2>>Append STDERR to file.
fileThe path to a file.

Remarks

  • You can add as many different redirections as you want, so long as the redirection symbol and file remain together and in the correct order.