Redirection > >> < | redirect input output append pipe in MS DOS command, A number of DOS commands send output to the screen and/or require input from the user. Redirection is a mechanism whereby the output of a command can be fed either to some other device for example, a printer or file, or to another program or command

Data Recovery PRO DATA DOCTOR

Home | Order Online | Downloads | Contact Us | Software Knowledgebase

it | es | pt | fr | de | jp | kr | cn | ru | nl | gr


Redirection

A number of DOS commands send output to the screen and/or require input from the user. Redirection is a mechanism whereby the output of a command can be fed either to some other device for example, a printer or file, or to another program or command.

There are four redirection functions:

Redirect output

>> 

Append

Redirect input

|

Pipe

>

Redirects a command's output from the "standard output device" (usually the monitor) to another device (e.g. printer) or a file.

Syntax:

To redirect output to a device:

Command > Device

To redirect output to a file:

Command > Filename

Acceptable Device names are, CON (Monitor), PRN (LPT1 - assumed to be the printer), LPT1 - 3 (Parallel Ports - usually connected to a printer), COM 1 - 4 (Serial Ports) and NUL (an electronic void).

If anything other than a recognized device is specified, it is assumed to be the name of a file. If a file already exists with the specified Filename, it is overwritten without any Warnings. Let us see some Examples to better understand it.

Probably the most common uses of this redirection function is to send directory listings to the printer or to save them as a file. To print out a sorted directory listing of all files in the Windows directory:

DIR c:\windows /o/a > PRN

To create a file containing the directory listing of the same directory:

DIR c:\windows /o/a > d:\windows.txt

>>

Appends the output from a command to the specified file.

Syntax:

Command >> Filename

If Filename does not exist, it is created. If Filename does exist, the output from the command is added to it, unlike the > function where the original contents are overwritten. Let us better understand it with example.

To add the directory listing of the files in the c:\windows\system directory to that created before:

DIR c:\windows\system /o/a >> d:\windows.txt

Sample Chapters from book DATA RECOVERY WITH AND WITHOUT PROGRAMMING by Author Tarun Tyagi
Data Recovery with & without Programming


Publishers of the Book
Number of Pages
ISBN
Price of the Book


BPB Publications, New Delhi, India
540
81-7656-922-4
$69.00 (Including Shipping Charges, Cost of Book and Other expenses, Free Source Code CD included with the Book)





Buy Data recovery Book

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15

Next page

© Copyright 2002-2005 DataDoctor.Biz

Home | Contact us | Downloads | Services | Terms and conditions | Site map

Website Data Recovery | recuperación de Datos | Récupération de données | Datenrettung | Recupero dati | データ復旧 | 데이터 복구 | 数据恢复 | Восстановление данных | De terugwinning van gegevens | Ανάκτηση δεδομένων
Sitemap Site map1 2 3 4 | Spanish1 2 3 | French1 2 3 | German1 2 3 | Italian1 2 3 | Portuguese1 2 3 | Japanese1 2 3 | Korean1 2 3 | Chinese1 2 3 | Russian1 2 3 | Dutch1 2 3 | Greek1 2 3
Data Recovery Book English | Spanish | French | German | Italian | Portuguese | Japanese | Korean | Chinese | Russian | Dutch | Greek