rmdir

Command Function

This command is used to delete a directory.

Syntax

rmdir [dir]

Parameters

Table 1 Parameter description

Parameter

Description

Value Range

dir

Specifies the name of the directory to be deleted. The directory must be empty. You can enter a path for this parameter.

N/A

Usage

  • The rmdir command can only be used to delete directories.
  • The rmdir command can delete only one directory at a time.
  • The rmdir command can delete only empty directories.

Example

Run rmdir dir.

Output

Figure 1 Deleting directory dir