However, you might want to place the results of several commands into a file.
In this case, you use two greater than signs (>>). A double output redirection pointer always appends
OUTPUTTING DATA FILES WITH THE TYPE COMMAND 381
the output of a command to the existing file. Here??™s an example of sending the output of the Dir
command to a file:
Dir *.TXT > MyFile.TXT
In this case, you??™d end up with a file called MyFile.TXT that contains a list of all of the text files
in the current directory.
Input relies on the less than symbol (<) or input redirection pointer. You can always use a file as
input to a command that??™s expecting text or record data. In some cases, you can use file input to generate
commands as well. The point is that a file or other streaming device acts as input. Although it??™s
extremely uncommon, you also have access to a double input redirection pointer (<<). This symbol
appends input to previous input for a command.
The combination of an output redirection pointer and an input redirection pointer can be the
same as a pipe. Here??™s an example of the two forms of redirection used together:
Dir /A-D > MyFile.TXT
Sort /+13 < MyFile.
Pages:
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905