Input Output file redirection in Windows

Anyone having any idea as to how to perform input output file redirection in windows. Any help will be really useful for all other windows user as well I guess.

It is not clear what you are asking but maybe you want the following.

<td align="center" valign="middle" > <td align="center" valign="middle" < <td align="center" valign="middle" >> <td align="center" valign="middle" >& <td align="center" valign="middle" <& <td align="center" valign="middle" |
Redirection operator Description
Writes the command output to a file or a device, such as a printer, instead of the Command Prompt window.
Reads the command input from a file, instead of reading input from the keyboard.
Appends the command output to the end of a file without deleting the information that is already in the file.
Writes the output from one handle to the input of another handle.
Reads the input from one handle and writes it to the output of another handle.
Reads the output from one command and writes it to the input of another command. Also known as a pipe.

For example, to feed input.txt as input (that is, STDIN) for a Java program ( say, Factorial ) and output the result to out.txt (that is, STDOUT), type after compilation :
**C:\>path o\folder\ java Factorial < input.txt > out.txt**

You will see that the inputs as supplied by the input.txt are processed and output is saved in out.txt. So here you are redirecting STDIN to input.txt and STDOUT to out.txt. Similarly you can do for file to file, file to printer, file to monitor etc…

For more information check here and maybe this also.

1 Like