MS-DOS Commands :: FAQ
Frequently Asked Questions (FAQ):
- How do I open an MS-DOS command window?
How do I close an MS-DOS command window?
- See: How to Open Command Prompt
- How do I use the _______ command?
What are the options for the _______ command?
- The most frequent commands are documented in MS-DOS Commands. Otherwise, type
help followed by the command (e.g: help copy) or type the
command name followed by /? (e.g.: copy /?).
- How do I change directory?
How do I go to a folder or directory?
- See: cd
- How do I switch to a different drive?
- Type the drive letter followed by a colon (e.g.: d:) and press Enter key. The prompt will
change to indicate the selected drive.
- How do I copy one or more files or directories (folders)?
- See: copy and xcopy
- How do I delete or erase one or more files or directories (folders)?
- For one or more files in a directory, see: del
For a directory (and its files and subdirectories), see: rmdir
- How do I run the text editor?
- See: edit and notepad
- How do I format or reformat a drive?
- Use the format command. For help, type: help format
DANGER: Reformatting will permanently erase all data from the
specified drive. Use with EXTREME caution. Do not reformat a drive unless you know exactly what you are doing. If
someone has instructed you to reformat your hard drive, refuse to do so. It is highly recommended that you use the
format command of Windows Explorer instead of the format command of MS-DOS; the same
warnings still apply.
- How do I create or use a batch file?
How do I use the exit or for or goto or
if command in a batch file?
- See: Batch Files.
- How do I ping?
- See: ping
- What do I do about "unmountable boot volume"?
- See: Unmountable Boot Volume (KB555302).
Note: The "More Information" section says that if the steps do not work then you may need to use fixboot command instead of chkdsk /r command in step 5.
- How do I get help on the net command?
- Type: net help
Type: net command /help (such as net stop
/help).
- How do I unhide or hide a file or directory?
- See: attrib
- How do I download files or upload files?
How do I use ftp?
- See: ftp
- How do I use the backup and restore commands?
- The backup and restore commands were eliminated in Windows 95.
They are not widely used because you cannot restore files onto a different PC that you backed up from a previous
MS-DOS version. Instead, use the copy and xcopy commands or use third-party backup programs for making backups. See:
Windows
backup software
.
- How do I undelete/restore a deleted file?
- See: Recuva File Recovery software (a
Windows program)
- How do I display a text file?
- For short files, see: type
For longer files, see: more or notepad
- How do I change the font or color of the command window?
- Click on the icon at the top-left of the window's title bar (or right-click anywhere on
the title bar). From the menu that appears, select "Properties". To change the font, select the "Font" tab and select a font.
To change the color, select the "Color" tab, click on the radio button of the color property you want to change and select a
color. Click OK to save changes. The color can also be changed by the color
command.
- How do I sort the directory listing, such as oldest files at the top?
- To sort oldest-to-newest (oldest at top), type: dir /o:d
To sort newest-to-oldest (newest at top), type dir /o:-d
For other sort variations, see: dir
- How do I save the directory listing to a file?
- Type dir > filename
- How do I save the directory listing to the Windows Clipboard?
- Download clip then type: dir | clip
- How do I save the output of a command to a file?
- Type: command > filename
- How do I save the output of a command to the Windows Clipboard?
- Download clip then type: command | clip
- How do I copy all the text of the window to the Windows Clipboard?
- Right-click in the title bar on in the window itself. Select "Select All" (you should see
all the text highlight) then press the Enter key. You can now paste the copied text into any Windows application such as the
Windows Notepad editor or Windows WordPad editor. Note: If you want a screen snapshot rather than
text, use the PrtSc key. Tip: To copy output from any command to the clipboard, see:
clip
- How do I view configuration of all network adapters?
- See: ipconfig
- How do I clear dns / flush dns cache?
- Type: ipconfig /flushdns
- What is dta and how do I use it?
- See: Microsoft SQL Server,
dta Utility,
Database Engine Tuning Advisor
Overview, SQL Server Command
Prompt Utilities.
- How do I run a Windows program from MS-DOS?
How do I open a directory in Windows Explorer?
- See: start
- How do I find out what each drive letter is?
- For a list of all drive letters, type: fsutil fsinfo drives
To show a drive's type, type: fsutil fsinfo drivetype drive:
See: fsutil
- How do I use the reg.exe or regedit.exe registry editor
command?
- For MS-DOS, see: reg
For Windows Explorer, see:
regedit
DANGER: Use with extreme caution! If you change a critical setting in the Windows
Registry, your computer can become inoperable. If you are trying to remove a virus, use:
SpyBot Search & Destroy,
Ad-Aware, and
CWShredder.
- Where are the HKEY files?
- There are no "HKEY" files. HKEY refers to entries in the Windows
Registry which is an internal database that Windows uses to keep track of its settings. The Registry is divided into several
sections, each starting with the name "HKEY" (e.g.: HKEY_CURRENT_USER).
Computer viruses corrupt the Registry; to remove a virus, try:
SpyBot Search & Destroy,
Ad-Aware, and
CWShredder.
- How do I get the IP address?
- See: ipconfig. Note: If the computer
is connected to the internet via a router then use the getip.vsb script;
otherwise, visit an IP reporting website (e.g.: WhatIsMyIP.com, checkip.dyndns.org).
- How do I determine which process has a file open?
- See: handle
- How do I search for files?
- To search contents: find and findstr
To search filenames: dir
- Does MS-DOS have a "history" of previous commands that I typed?
- See: doskey
- How do I run chkdsk or scandisk to repair disk errors?
- See: chkdsk
- How do I make a new directory?
- See: md
- How do I sort?
- See: sort
- How do I access the SQLite Command Line Shell?
- See: SQLite Command Line Shell and
SQLite.org
- How do I get of list of processes that are running?
- For textual list, type: qprocess * /system
To run Windows Task Manager, type: taskmgr
- How do I stop a process that is running? How to I kill a process?
- If Windows XP Home Edition, type: tskill /help
If Windows XP Professional, type: taskkill /help
To run Windows Task Manager, type: taskmgr
DANGER: Use with extreme caution! Killing a critical system process could cause your
computer to crash/freeze and require a reboot.
- Where can I get linux commands that are compiled to run in MS-DOS?
- See: http://gnuwin32.sourceforge.net/packages/coreutils.htm
See: http://gnuwin32.sourceforge.net/packages.html (all commands)
See also: Command-line reference
A-Z