Link to home
Start Free TrialLog in
Avatar of sivasubramaniam_it
sivasubramaniam_itFlag for India

asked on

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

sir,
plz tell the ms-dos command to delete a non empty directory in windows xp.
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Get deltree.exe from http://www.techadvice.com/W95/S/start-up_disk_w95.htm.

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

suppresses also the confirmation prompt. use wih caution!
paraghs, Deltree does not exist in XP - why would you download another program when RD works fine?
Lee,
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.
DELTREE doesn't exist in XP and besides, XP and 9x/DOS are based on two different technologies.
Avatar of roadhog_NZ
roadhog_NZ

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.  :(



--John