Home > Windows > How to delete a folder/directory using cmd

How to delete a folder/directory using cmd

Suppose you would like to delete a file or directory to ease some time.

let’s start with locating our folder, our folder is inside My Documents we will name this deletethisfolder

open your cmd, then locate your folder.

Follow this path in your cmd

C:\Documents and Settings\admin> cd “My Documents”

Press Enter,

C:\Documents and Settings\admin\My Documents>rmdir /s /q

ex.

C:\Documents and Settings\admin\My Documents>rmdir /s /q “C:\Documents and Settings\admin\My Documents\deletethisfolder”

or this:

C:\>rmdir /s /q “C:\Documents and Settings\admin\My Documents\deletethisfolder”

That’s it! your folder is now deleted!!!

If you want only a sub-folder under “deletethisfolder” directory let’s say another_sub_directory

then we’ll append the name of the sub directory/folder:

C:\Documents and Settings\admin\My Documents>rmdir /s /q “C:\Documents and Settings\admin\My Documents\deletethisfolder\another_sub_directory”

Hope this Help you GUYS! stick around!!!

About these ads
Categories: Windows Tags: , ,
  1. Joseph hannum
    November 21, 2009 at 2:22 am | #1

    Excellent! Explorer had locked out a file I was trying to get rid of. So I killed explorer and used this method to kill the folder! Thank you much!

    -Joseph

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: