rd

Windows CMD · Directories · available in the simulator · Also: rmdir

What it does

Removes an empty directory.

Syntax

rd [/s] [/q] [unidad:]ruta

Options and parameters

  • /s

    Deletes the entire directory tree.

  • /q

    Quiet mode.

  • /S

    Removes the directory and all its contents, including subdirectories.

    rd /s carpeta
  • /Q

    Quiet mode; does not prompt for confirmation when using /S.

    rd /s /q carpeta

Usage examples

  • rd sistemas
  • rd sistemas /s
  • rd sistemas /s /q
  • rd carpeta
  • rd /s /q carpeta
  • rd /s carpeta

Notes and common mistakes

  • Without /S, deletes only empty directories. rmdir is equivalent.
Practise rd

Related commands