InfoExchange
Would you like to react to this message? Create an account in a few clicks or log in to continue.

COMMAND REDIRECTORS

Go down

COMMAND REDIRECTORS Empty COMMAND REDIRECTORS

Post  Admin Thu Aug 06, 2009 7:27 pm

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

Admin
Admin

Posts : 408
Join date : 2009-04-25

https://xd627.forumotion.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum