ms-dos command to delete a non empty dir in windows xp

plz tell the ms-dos command to delete a non empty directory in windows xp.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
RD /S DirName

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paraghsDy General ManagerCommented:
Get deltree.exe from

The command is :
deltree /y dirname
Michael PfisterCommented:
rd Dirname /q/s

suppresses also the confirmation prompt. use wih caution!
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Lee W, MVPTechnology and Business Process AdvisorCommented:
paraghs, Deltree does not exist in XP - why would you download another program when RD works fine?
paraghsDy General ManagerCommented:
You are right that RD command works, and is available with Windows 2000/XP.
Deltree is just another option :)

Original RD command (upto DOS 6.0) was designed to remove only empty directories, and DELTREE was then created to remove directories full of files.
Lee W, MVPTechnology and Business Process AdvisorCommented:
DELTREE doesn't exist in XP and besides, XP and 9x/DOS are based on two different technologies.
my question would be why are you not just deleting it from xp? is there a problem?

Take the hard drive out and put it in a second machine, delete & repair then put back ... it will be quicker than finding an old alternate to deltree.  :)

Otherwise del .
"y" for yes to all
let it delete
then rmdir (name of dir)

you will have to do a dir
to get the 8.3 name of the dos dir to delete
most-likely it will be somena~1.rad or somena~2

so after you remove all the files you can remove the directory... do not forget that all sub dirs have to be removed manually if you don't find a deltree substitute.  :(

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.