Command Prompt

Complete on key

See [http://support.microsoft.com/kb/310530](http://support.microsoft.com/kb/310530).

On:

cmd /f

Off:

cmd /f:off

Permanent

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor
  • 0x4 — Ctrl+D
  • 0x4 — Ctrl+D
  • 0x9 — Tab

Multiple commands

/k runs a command and keeps the processor:

/k <command-1 ["Arg-1"]>[ & command -2]

Start in a specific directory

start /d <path>

Streams

Redirect stdout to a.txt and stderr to stdout:

> a.txt 2>&1

Comment

Echo off & REM

:: is an empty label. It spawns two lines and may break goto.

::

Same-line comment:

%= _ =%
Updated: 2026 Aug 19