Friday, October 5, 2007

the copy,diskcopy,rename,move,erase and scandisk commands

The COPY command (it’s an internal command, remember a basic command contained in command.com) copies one or more files from one disk to another. It also lets you make another copy of a given file on the same disk but with a different file name. The order in which you type a copy command is COPY [d:] filespec [d:] [filename [.ext]]. Remember anything in brackets signifies that it’s an optional part of the command. Filespec signifies the specification of the file or group of files to be copied. Both the source (where your file is located waiting to be copied) and target (the place where you will copy your file) directories must be specifically made known. And once again, the notion of the default drive/directory kicks into gear if you don’t specify either or both the source and target directories.
The DISKCOPY command (an external command not contained in command.com) allows you to copy one diskette onto another. It doesn’t just copy one file at a time; it copies the whole disk exact to the target disk. This means that all the information on the target disk will be erased and replaced with the source disk information. DISKCOPY also copies system and hidden files, even if they are fragmented. The way in which you enter the information in the DOS window for this is DISKCOPY [d:] [d:] for example “diskcopy c: b:”.
The erase command (an internal command) deletes a file or group of files from a disk. You type it in the DOS window as follows: “Erase filespec” or “del[ete] filespec”. The Rename command is another internal command that changes the name of a file or group of files. To type it in the DOS window, it goes like this: “REN[ame] filespec filename [.ext]. The MOVE command is another internal command that changes the name of a directory. The form to type it in the DOS window is “move . SCANDISK (an external command) is in the later versions of DOS and is like CHKDSK and checks the status of a disk and prepares the status report.

No comments: