computer help index
 
 
Search:
"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,360 tips!

Windows XP and DOS

Remove a Directory and All Subdirectories

SUMMARY: Use these Windows XP and DOS command line parameters with the RMDIR command to remove all subdirectories.

The Windows XP DOS command RMDIR removes a directory from your system and has the following syntax:

RMDIR directory_name

For example, to remove directory C:\BLAH, enter:

RMDIR C:\BLAH

Note that you cannot be inside the directory that you are deleting; else you will be prompted with the message "The process cannot access the file because it is being used by another process".

Normally the RMDIR command will not remove a directory if it is empty. However, if you add the /S parameter, all files and directories underneath the specified directory will be removed. USE WITH CAUTION! You will be prompted with an "Are you sure" question that lets you back out in case you entered the wrong directory name.

If you need to perform this task in a batch file, you can add the /Q parameter to the end. This will delete the specified directory, all files, and all subdirectories, WITHOUT ANY WARNING.

For example, the following command will remove directory C:\blah and all subdirectories and files contained therein. No prompt will be displayed.

RMDIR c:\blah /s /q

If you wish you can use RD as an abbreviation for RMDIR.

 

 
Add: Del.icio.us | Digg | Furl | My Yahoo!
 

Discuss This Tip

Print This Tip

Get E-Mail When New Tips are Online

Return to the Windows XP and DOS page.


More in MalekTips:
Internet Explorer 7 MiscWindows Vista - ExplorerGoogle Image Search



Change Cache SizeCopy File or Folder Path to DOS Prompt or Windows AppSearch for Images in Various Sizes

RSS Feeds - Subscribe!
 

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Subscribe'.
 



( sample / details ) ( opt-out instructions )
 


 Free Offer! - Subscribe to the MalekTips computer help list and be one of the first to get new computer tips, articles, and download links! ( privacy policy )  ( opt-out instructions )
This page and its contents are copyright
©1997 - 2008 Envision Programming. ( copyright/disclaimer )

Home | Free Computer Help Newsletter! | Windows | Web Development | DOS and Batch Files | Removing Spyware
Digital Camera and Photography | Computer and Internet | Software | Microsoft Word
Computer Articles | About | Contribute a Tip | Link To Us! | Computer and Technology Links
RSS Feeds |  Contact Us | Advertising | Privacy Policy | Computer Help Forums