Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
in windows 2000 there is no deltree command.
microsoft is trying to phase out dos.do anyone have a deltree that is not dos
version specific? prehapes a old little util
that was used by people before dos version
6.2 came out.please email me and reply here.
thx -- ericrae@vcn.bc.ca

.. might be able to set up deltree using SETVER.
other than that.. probably something on one of the old software boards, like Simtel or Zdnet etc

I had no troubles using deltree from a WIN98SE installation on my WIN2K Installation
In response to Astroraptor: It's good for use in batch files and scripts

I use the following batch file to emulate the DELTREE command using W2k internal commands:
===Start 'DELTREE.BAT'===
@echo off
if '%1'=='' goto Help
if not '%3'=='' goto TooManyParms
if '%1'=='/y' goto Quiet
if '%1'=='/Y' goto Quiet
if '%1'=='/?' goto Help:Confirm
rmdir /s %1
GOTO End:Quiet
if '%2'=='' GOTO Help
ECHO Deleting '%2'
rmdir /s /q %2
GOTO End:TooManyParms
ECHO Too many paramters.
GOTO End:Help
ECHO Deletes a directory and all the subdirectories and files in it.
ECHO.
ECHO To delete one or more files and directories:
ECHO DELTREE [/Y] [drive:]path [[drive:]path[...]]
ECHO.
ECHO /Y Suppresses prompting to confirm you want to delete
ECHO the subdirectory.
ECHO [drive:]path Specifies the name of the directory you want to delete.
ECHO.
ECHO Note: Use DELTREE cautiously. Every file and subdirectory within the
ECHO specified directory will be deleted.
ECHO.
GOTO End:End
===End 'DELTREE.BAT'===-Mike

I found this page because I discovered that Windows NT 4.0 does not come with the "deltree" command. After reading the above, I copied it over from a Win98 machine, and it worked fine.
Also please note that the RD command doesn't work if the directory isn't empty. The nice thing about DELTREE is that it deletes the directory specified even if it contains files. In fact, for use in batch files: DELTREE /Y D:\FOLDER will delete the folder no questions asked. Very handy (and possibly dangerous, so be sure to doublecheck where it is pointing before you invoke it)

Fortunately, Win98SE deltree seems to work fine under Win2K.
RD /S /Q should delete an entire tree, quietly.
A problem I found with "RD /S /Q", is that it's unable to delete files on a Netware filesystem, when a "normal" filename (less or equal 8 char.) is equal to another short file name...
Example :
Objasup2.LUS is equal to the short name of Objasup2b.lus
....
So, Rd /S /Q needs TWO rounds to finish, one for each file... perhaps more if more files share the same short name (not tested).Del /s /q has the same handicap.
Deltree /y works fine.
Phew !

deltree is in the c:\windows\command or c:\winnt/command folder on a win2K system. It does not run from the command prompt because it is not in the path. Change your path if you want to be able to run it from anywhere..
Robert Simpson
Network Engineer
Virtucom

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |