rmdir

Command Function

This command is used to delete a directory.

Syntax

rmdir [dir]

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

dir

Indicates 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

Enter rmdir dir.

Output

Figure 1 Deleting directory dir