20 Dec 2017

UNDERSTANDING DOS COMMANDS


Dos commands are very easy to use- after you’ve palyed with them a few times. All you need is to understand the syntax and spelling and to press enter after you type the full command. As you go through this tutorial, you may wish to practice and experiment with the commands

After you’ve used these basic commands for a while in your work on computers, spend some time looking through Dos help to discover the subtleties of the Dos commands you use most. Sometimes adding one switch to your repertoire can really speed up your routine work.

CD(CHDIR)

If YOU CD at the prompt, you will see the name of the current directory. This MAY SEEM ODD, SINCE Cd stands for change directory. But if you type CD)\ followed by the name of the directory, DOS will move to that directory. Note that there is no space between CD\ and DOS.

. CD\ takes you to the root.

. CD\ followed by the name of a directory takes you to that directory if it under the root. For example, CD\DOS will take you to Dos directory. Note that there is no space between CD\ and DOS.

CD followed by the name of a directory takes you to that directory if it is under the current directory. For example, if you type CDTEMP while in the DOS directory, you will be taken to the C:DOS\TEMP directory.

CD…. Move you to the parent directory of the current directory. Note that there is a space between CD and “….” Fro example, if you are in the C:\DOS\TEMP directory, typing CD… will take you to the DOS directory.
READ MORE

CHKDSK

DOS version6.2 introduce a command called SCANDISK, which you used instead of CHKDSK, if you have it. Otherwise, you may want to use CHKDSK on occasion to recover lost disk space.DOS losses disk space when it fails to keep its file tracking system in order. The chksdk command produces a hard disk tracking system in order. The CHKSDK command produces a hard disk status report that can alert you to errors in DOS’S filing system. It also has a limited ability to fix disk error.

To check a hard disk and attempt to resolve disk errors, type CHKDSK followed by the driver letter and the switch’ f, as in the following

CHKSDK C:/F

CLS: any time you have too much useless stuff printed on your screen, type the clear screen command, CLS,to wipe it away, This command clears the screen and returns you to a DOS prompt at the top of the screen.

COPY

This command makes a duplicate of one or more files. For example, if you want to make a backup of your CONFIG.SYS file, you can go to the directory in which it is stored and make a copy using the copy command as follows.

COPY CONFIG.SYS CONFIG.BAK

You can also make copies to save in other location. For example, if you want to copy your CONFIG.SYS file to a floppy on the drive, type the following;

COPY C:\ CONFIG.SYS A

Copy also allows you to duplicate a file to other directories on the same drive. For example, the following command makes a duplicate of the CONFIG.SYS file a directory called BACKUP under the other directory.

COPY C:\CONFIG.SYS C:\OTHERS\BACKUP

If you want to copy multiples files at the same time, you may find that a wildcard is helpful. For example, to copy all of the files on floppy in A: drive that end with EXE to a directory on the C; drive called MISC, you could type the following.

COPY A:*.EXE C:\MISC

DEL

When you want to delete one or more files, you can use DEL ( or erase.) The following, fro example deletes the document NONEED:

DEL NONEED.DOC

DEL  can also be used with wildcard. To delete all the files ending with DOC in a directory, for example, you could type the following DEL*.DOC

DELTREE

This command was introduced with DOS 6. It allows you to delete a directory and all the file and subdirectories contained within it(i.e a tree”0 in one fell swoop. Normally, you will be prompted to confirm the deletion, but if you are feeling especially bold, you can add the switch\Y to skip the prompt. To delete called EXTRA, along with all subdirectories and files, the following would suffice:

DELTREE C:\EXTRA








  




 

No comments: