You are not logged in. Please login at to post your questions!


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.

asked 17 Mar '15, 09:48

foolan's gravatar image

accept rate: 0%

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

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\to\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.


answered 17 Mar '15, 15:15

mediocoder's gravatar image

accept rate: 36%

edited 17 Mar '15, 21:31

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 17 Mar '15, 09:48

question was seen: 2,498 times

last updated: 17 Mar '15, 21:31