COMMAND REDIRECTORS
Page 1 of 1
COMMAND REDIRECTORS
The use of redirectors on command prompt commands is not something the average user really needs to know much about (despite screams of protest from assorted Linux enthusiasts), so we will not explore this area in much detail. However, there are some command filters which can benefit any user.
A command redirector takes the output or contents of one command or file and sends it to another file or command. That's pretty much it. Simple right? Well no, but we're going to keep it simple by only using a couple of them. For a full explanation/list see the documentation on Microsoft's website. The two redirectors we are concerned about deal with redirecting the output of commands to files. This allows you to conveniently store the results of your commands in text files and spreadsheets for archiving and/or printing.
To output the results of a command to a file, use the '>' sign. For example, to copy the results of your DIR command to a text file for storage;
type: Dir > c:\mydirfile.txt
This will create a file called 'mydirfile.txt' in your C:\ directory which will contain the results of your DIR command. I think you can see the potential usefulness of this. The '>' operator creates a new file every time it is used. This means that if you use the same file name twice, you will lose the previous data. To append data onto the end of an already created file, use the '>>' redirector.
Source:
http://www.pcstats.com/articleview.cfm?articleid=1723&page=6
A command redirector takes the output or contents of one command or file and sends it to another file or command. That's pretty much it. Simple right? Well no, but we're going to keep it simple by only using a couple of them. For a full explanation/list see the documentation on Microsoft's website. The two redirectors we are concerned about deal with redirecting the output of commands to files. This allows you to conveniently store the results of your commands in text files and spreadsheets for archiving and/or printing.
To output the results of a command to a file, use the '>' sign. For example, to copy the results of your DIR command to a text file for storage;
type: Dir > c:\mydirfile.txt
This will create a file called 'mydirfile.txt' in your C:\ directory which will contain the results of your DIR command. I think you can see the potential usefulness of this. The '>' operator creates a new file every time it is used. This means that if you use the same file name twice, you will lose the previous data. To append data onto the end of an already created file, use the '>>' redirector.
Source:
http://www.pcstats.com/articleview.cfm?articleid=1723&page=6
Similar topics
» SWITCHES AND COMMAND HELP
» CREATING YOUR OWN COMMAND PROMPT
» NAVIGATING THROUGH THE COMMAND PROMPT
» COMMAND PROMPT FUNCTIONS
» ENTERING THE WINDOWS XP COMMAND PROMPT
» CREATING YOUR OWN COMMAND PROMPT
» NAVIGATING THROUGH THE COMMAND PROMPT
» COMMAND PROMPT FUNCTIONS
» ENTERING THE WINDOWS XP COMMAND PROMPT
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|