TIP: Click on subject to list as thread! ANSI
echo: batpower
to: Dan Ceppa
from: Paul Quinn
date: 2005-01-03 23:05:00
subject: A Dangerous Command

Hi! Dan,

In a message to All you wrote:

 DC> Yes, I know this request is not for the faint of heart.

 DC> But, how do you automatically provide a "Y" and "Enter"
 DC> for calling up a "  dele *.*  " ?

 DC> Yes, I've already pretested the BAT file!

:)  And, now for something different... try using DELTREE instead.  I have
two ideas in my captures from over the years, both untried though (I have
better ways of destroying files than using BATch files).  Have a squiz at
this lot:

-----88-----
Have a directory with a bunch of subdirectories that you want to remove?  Have
a file  with some  attributes set  and don't want  to take the time to reverse
them?  Use  MS-DOS 6.0+'s  new  DELTREE  command.  It works  on both files and
directories, regardless of content or  attribute.  Don't want to be  asked for
confirmation?   Use  "DELTREE /Y filename.ext"  for  a  file  and
 "DELTREE /Y
dirname" for a directory and it's contents. 

* PC Computing - August 1994
-----88-----

Mmm, fascinating.  Here's another one from our very own Bat Lang a few years later:

-----88-----
DELTREE /Y C:\TRASHCAN\
                      ^
That trailing _______/ will preserve the \TRASHCAN dir, whilst 'pruning'
all the tree downstream.  This should be faster (tho you prolly can't
observe it) since it eliminates the pipe and it's associated temp file.
-----88-----

Mmm, even juicier.  Bat was talking about using the 'pipe' thingy you had
in mind, attempting to pass the "Y" option to DEL.  Using DELTREE
ends up being a smidgin faster.  :)

Have fun with it!

Cheers,
Paul.

--- Radius 4.010,26/08/04,TAPIBeta
* Origin: Open the pod bay doors, HAL. (IP 1200-1500 UTC) (3:640/384)
SEEN-BY: 633/267 270
@PATH: 640/384 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.