![]()
Searching for files:
DIR command can be used to locate files easily on the disk
/S: To View files which includes sub-directories
/P : To View a page-wise listing of files
/W : To View width-wise listing of files (five columns without any details)
TYPE: To display the contents of a file on the screen
MD : To make a directory
CD\dir name: To change a particular directory
CD\ : To change to the root directory from any directory
CD.. : To change to parent directory
RD : To remove a directory
/O: <sortorder>To arrange the directory by name, size, extension, date, and time.
/O:N : To sort the files alphabetically[a-z] by filename and
/O:-N : To sort the files in descending order[z-a].
/O:E : To sort the files alphabetically by extension.
/O:-E : To sort the files in reverse order by extension.
/O:S : To sort the files in ascending order by size .
/O:-S : To sort the files in reverse order by size.
/O:D : To sort the files on date from a lower date to higher date.
/O:-D : Will put it in reverse order.
/H: To View Hidden Files
/L: To convert the display of the directory entries from Upper case to Lower case.
COPYing a file:
C> COPY first.doc second.doc
DELeting a file:
C> DEL second.doc
WILDCARD characters: Used for substituting one character or a set of characters. The wild card characters are used to restrict the scope of a DOS command to only those files which matches the pattern specified. These are of two types - " * " and " ? ", where " * " can substitute a set of characters and " ? " can only substitute a character at a particular position.
FOR DEVICES:
COPY<FILENAME> <DEVICES>
e.g,
C> COPY LETTER. * PRN
DOS sends all the files starting with the filename letter to the printer
COMBINE:
COPY <SOURSE FILE> <+> <SOURSE FILE> <TARGET FILE>
we can use the " + " symbol to combine several files into one file.
RENaming Files:
REN <OLDNAME.EXT> <NEWNAME.EXT>
The REN command is used to rename a file's name or extension or both.
DATE:
C>DATE : To display the current date
C>DATE 4-12-90<ENTER> : To enter a new date
TIME:
C>TIME<ENTER> :To display the current time
C>TIME 8.30<ENTER> : To enter a new time
CLEAR:
C>CLS: To clear the screen
FORMAT command:
C>FORMAT A:<ENTER> : For Formatting a Floppy disk in the A drive
use DOSKEYS:
Remember when you gave a long command in DOS? And then you got an error message "Bad command of filename"?. If there is a command you execute very often, you might want to use a small utility called DOSKEYS, which comes free with DOS. The program loads up and stays in the memory. It then 'remembers' the last few commands that are issued at the prompt. To reuse a command, you can make use of the cursor keys and function keys.
The UP and DOWN keys display the previous command or, if in the middle of the list, the next command. To display all the commands that are currently stored in memory, use the [F7] key. This will list the commands with a number, that could also be used to call a command quickly. Press [F9] and then the command's number and the command will be displayed on the prompt line. Rather than remembering silly numbers, that will change when more commands get added to the list and others drop off, you could key in the first few characters and then press [F8] to recall the command.
There might be some typing errors