Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: RD (RMDIR)
 Description
 Syntax
 Parameters
 Related Commands
 Remarks
  Cannot delete directory with hidden or system files
  Using the backslash character with the path parameter
  Deleting the current directory
  Attempt to remove current directory - drive:path
 Examples

MS DOS Command: RD (RMDIR)

Reference from Microsoft MS-DOS cmd help

Description

Deletes (removes) a directory.

Before you can delete a directory, you must delete its files and subdirectories. The directory must be empty except for the "." and ".." symbols.

Syntax

RMDIR [drive:]path RD [drive:]path

Parameters

[drive:]path Specifies the location and name of the directory you want to delete.

Related Commands

For information about creating a directory, see the MKDIR command.

For information about hidden files, see the ATTRIB command and the DIR command (the /A switch).

For information about deleting files, see the DEL command.

For information about deleting a directory, its files, and all subdirectories and files subordinate to it, see the DELTREE command.

Remarks

Cannot delete directory with hidden or system files

You cannot delete a directory that contains files, including hidden or system files. If you attempt to do so, MS-DOS displays the following message:

Invalid path, not directory,

or directory not empty

Use the DIR command to list hidden and system files and the ATTRIB command to remove hidden and system attributes from files. For more information, see those commands.

Using the backslash character with the path parameter

If you insert a backslash (\) before the first directory name in path, MS-DOS treats the directory as a subdirectory of the root directory--regardless of your current directory. If you do not insert a backslash before the first directory name in path, MS-DOS treats the directory as a subdirectory of the current directory.

Deleting the current directory

You cannot use RMDIR to delete the current directory. You must first change to a different directory (not a subdirectory of the current directory) and then use RMDIR with a path. If you attempt to delete the current directory, MS-DOS displays a message in the following format:

Attempt to remove current directory - drive:path

MS-DOS also displays this message if you attempt to delete a directory that has been redirected by using the SUBST command.

Examples

To delete a directory named \USER\SMITH, first ensure that the directory is empty, as in the following example:

dir \user\smith /a

MS-DOS should display only the "." and ".." symbols.

Then, from any directory except \USER\SMITH, type the following command:

rmdir \user\smith

You can type the following command with the same result:

rd \user\smith


©sideway

ID: 110700244 Last Updated: 7/29/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019