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

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

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

Previous page

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

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 

 

Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor