| Command(s) | Purpose |
|---|---|
| help | display list of DOS commands |
| net help | display help for NET command |
| cd command | move to command directory |
| dir/w | display contents in wide format |
| dir /? | display help for DIR command |
| cd \ | move to root directory |
| dir | display contents of current directory |
| dir/w | display current directory in wide format |
| dir/p | display one screen at a time |
| dir | more | display one screen at a time |
| dir/ah | display hidden files |
| dir/as | display system files |
| dir/od | display files in order of date |
| dir/o-d | display in reverse order of date |
| dir *.txt | display text files |
| dir *.bat | display batch files |
| dir autoexec.* | display files named autoexec with any file type |
| type autoexec.bat | display the contents of the autoexec.bat file |
| md os | create a directory named os |
| cd os | change into the os directory |
| cd .. | move up to higher level directory |
| rd os | remove directory named os |
| copy autoexec.bat a.bat | copy a file |
| xcopy /? | more | display options for xcopy command one screen at a time |
| ren a.bat b.bat | rename a file |
| del b.bat | remove a file |
| date | display/change date |
| time | display/change time |
| ver | display version of windows |
| vol c: | display volume label of hard disk |
| mem | display memory |
| chkdsk | display disk space and check for errors |
| cls | clear screen |
| prompt $p$g | make the prompt display current directory and > symbol |
| prompt /? | display prompt options |
| set | display environmental variables |
| set myvar=myvalue | set the variable myvar to myvalue |
| echo foo > bar.txt | create a file named bar.txt containing one line of text |
| type bar.txt | display contents of the file bar.txt |
| echo baz >> bar.txt | add a line of text to the end of bar.txt |
| type bar.txt | display contents of the file bar.txt |
| type bar.txt | sort > out.txt | sort the file bar.txt and save the results in out.txt |
| del bar.txt | delete the file bar.txt |
| del out.txt | delete the file out.txt |