Find Articles in:
All
Business
Reference
Technology
News
Lifestyle

MS-DOS shortcuts - guidelines for using MS-DOS - Your free operating system roadmap - tutorial

Home Office Computing, June, 1991 by Jack Nimersheim

In many cases, the lost clusters will represent portions of a data file that, with the appropriate knowledge, you can merge back into their proper location--a process that, unfortunately, is beyond the scope of this article.

8. Back up files easily. The XCOPY command, introduced in MD-DOS 3.2, eliminates one of the most obvious shortcomings of the standard COPY command. Specifically, whereas COPY can be applied only to files in a single directory, XCOPY copies files from multiple directories in one operation. XCOPY supports a number of command switches, but the most useful by far is the /s (subdirectories) switch.

For example, the following command would copy all the batch files located on drive C to a disk in drive A, regardless of the directory in which they were stored: XCOPY C:\*.BAT A:?s

During this XCOPY operation, DOS automatically creates on the disk on drive A any subdirectories from drive C that contained files with a BAT extension before copying the backup files to them. In essence, XCOPY lets you easily clone file and directory structures from disk to disk.

9.Discover shortcuts. DOS provides several useful shortcuts that speed up many common PC procedures.

Simplify commands. DOS supports two wild-card characters that make it easier to enter DOS commands:

* When included in a file name, an asterisk (*) indicates that any character can occupy that position or any of the remaining positions within the file name or the extension (but not both). For example, you'd display all batch files (that is, files having a BAT extension) stored on the root directory of the disk in drive A with the following command:

DIR A: *.BAT

* When included in a file name, the question mark (?) indicates that any single character can occupy that position. The following command, for example, would list all batch and backup (BAK extension) files stored on the root directory of the disk in drive B:

DIR B: *.BA?

Speed around directories. As your directory structure becomes more sophisticated, chances are it also grows in complexity. This is especially true on a hard disk, which can hold literally thousands of files. Suppose, for example, that you're in a directory called \LOTUS\DATA\BUDGET91\TEXT, and you want to move to the directory one level above this one in your disk structure (BUDGET91). You could enter the following CD (remember, Change Directory) command to accomplish this:

CD \LOTUS\DATA\BUDGET91

Or, you could use this DOS shorthand notation to accomplish the same thing more simply, as shown in this second example:

CD ..

The double period (..), a simple but useful notation that indicates the directory one level up from the current active directory, can be used with many disk-related commands such as COPY, DIR, and DEL.

DOS IT

Well, that about does it for this brief DOS traveler's guide. Not all DOS techniques are as obvious or easy to find as the ones here, but checking out one DOS procedure in your manual and then discovering several previously unknown timesaving steps can be fun and educational--like stopping at a gas station to pick up a state map and coming out with a world atlas.

 

BNET TalkbackShare your ideas and expertise on this topic

The following tags are supported in BNET comments:
<b></b> <i></i> <u></u> <pre></pre>

Leave a Reply

  1. You are currently a guest | Login?
advertisement
CIO SessionsVision Series on ZDNet

See and hear what CIOs the world over thinks about the business of technology and how it's changing the way we live and work.

Go
advertisement
  • Click Here
  • Click Here
advertisement

Content provided in partnership with http://findarticles.com/source//