ITsVISTA
Information that makes life easier when it comes to installing, managing, and using Windows Vista.
Start About FAQ Blogroll Shop

Vista's RMDIR Command

Removes 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 ok to remove a directory tree with /S

Get notified of new posts for FREE via RSS or E-mail

Subscribe to ITsVISTA!

Related Posts

Comments

  • Phan Hoang

    May 14, 2007 at 11:03 pm

    Please tell me: How to recover files/folder after RMDIR command!?

  • Joe

    May 16, 2007 at 7:43 pm

    At this point you’ll probably have to use a program like ‘Restoration’ (www.snapfiles.com/get/restoration.html) or ‘Recuva’ (www.recuva.com/) (both free file recovery programs). These programs will check all free disk space for the remains of previously deleted files. If you haven’t done much on your computer since deleting the file, there is a good chance of recovering the file. If you’ve done a lot of downloading, it’s possible a new file has been written over the space that previously held your file. Good luck!

  • Bob

    Nov 2, 2008 at 12:37 pm

    This functionality was changed from the way it had worked in the 30 years previous to Vista… now it deletes folders AND the files they contain instead of just folders. Thanks for deleting my stuff Microsoft! You rock!

  • hotshot309

    Jan 3, 2009 at 11:07 pm

    Rmdir and rd are now the same command, since Windows 2000. Deltree (Windows 98) no longer exists but is the equivalent of the modern rmdir /s and rd /s commands.

    In Windows 98, rd and rmdir were identical in function except that rd could remove the current directory while rmdir could not (supposedly–this is not true for Vista, I know). Deltree /y and rmdir /q or rd /q are also equivalent — they delete the whole directory tree without prompting for confirmation.

    On Vista, rmdir and rd will only delete empty directories, and otherwise will return a message stating that the directory is not empty and stop there. This is true UNLESS you specify the /s switch, in which case rd or rmdir will prompt you first (y/n) if the directory you specify isn’t empty, before removing all its contents; or UNLESS you specify /q, in which case rd or rmdir will NOT prompt you further before permanently deleting the whole folder tree you specified.

    If you do your rmdir/rd deletions from the bottom to the top of a directory tree, you can delete all the empty directories — and only the empty ones (specifics here: http://forums.slimdevices.com/showpost.php?p=237137&postcount=2).

Leave a Comment