Friday, March 18, 2011

How to Delete a Folder from Command Prompt

Occasionally the best method for removing directories is using good ol' Command Prompt. Such case might be for example when you need to bypass Windows' directory path limitations.

Use commands RMDIR or RD in Command Prompt to remove directories.

Here's the syntax and parameters for RMDIR and RD:
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

    /S      Removes all directories and files in the specified directory
            in addition to the directory itself.  Used to remove a directory
            tree.

    /Q      Quiet mode, do not ask if okd to remove a directory tree with /S