WARNING: This site is intended for online use only; mass-downloading of pages degrades the server and is prohibited.
If you attempt to use tools to mass-download the site, you may be blocked permanently by automated software.
If you want to read this CertiGuide offline, please use one of the links on the left to purchase a convenient PDF copy. Thank you.

Like what you see? Get it in one document for easy printing!
Click Here!

Custom Search






Table Of Contents  CertiGuide to A+ (A+ 4 Real)
 9  Chapter 1: What are Operating Systems and How Do They Work?
      9  CDI System Commands

Previous Topic/Section
The Copy and XCopy Commands
Previous Page
Pages in Current Topic/Section
1
Next Page
The Del / Erase Command
Next Topic/Section

The Echo Command

The echo command takes a text string as a parameter, and writes (“echos”) it straight back to the screen. At first glance, this may seem a useless command, which is true when working directly with the CDI. When writing batch files (files containing multiple commands) however, it is the only way to display a progress update on screen as the batch file is processed. One trick that always puzzles new users of this command is the syntax to produce a blank line. Typing the echo command without any parameters may sound like the correct way to do this, but in fact suffixing echo with a full stop (echo.) is the only way to produce a blank line.

Figure 181: The Echo Command

 


The cryptic “Echo is on” reply to the first command actually has little to do with the echo command, and more to do with batch files. Batch files are discussed later in this chapter, however to prevent a batch file from printing each command to the screen before executing it, type “@echo off” as the first command in the file.

Echo has one further use, in a technique known as “piping”. It is possible to pipe the output of echo to a file, device or even as input to a program. Using the “>” symbol followed by a filename after an echo statement will allow you to pipe the output of the echo into the filename specified. For example, typing “echo test > out.txt” into the CDI will create a file named out.txt, with the word “test” inside.

Almost all CDI commands allow for piping, which can be exceptionally useful when tracking changes. The classic use of piping is with the dir command – if you need a directory listing of every file and folder on the hard drive saved to a file, do not purchase third party tools to do it. Simply type “dir c: /s > dirlist.txt” (the “/s” parameter tells the dir command to iterate through all sub directories) at the CDI prompt, and the job is done!


Previous Topic/Section
The Copy and XCopy Commands
Previous Page
Pages in Current Topic/Section
1
Next Page
The Del / Erase Command
Next Topic/Section

If you find CertiGuide.com useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider buying an inexpensive PDF equivalent of the CertiGuide to A+ (A+ 4 Real) from StudyExam4Less.com. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005

Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.