Dec 122017
Delete directory & included files/subdirs.
File KILLDIR2.ZIP from The Programmer’s Corner in
Category File Managers
Delete directory & included files/subdirs.
File Name File Size Zip Size Zip Type
KD.EXE 9712 5884 deflated
KD.PAS 14234 4161 deflated
KDY.EXE 9584 5819 deflated
KILLDIR2.DOC 2247 1070 deflated

Download File KILLDIR2.ZIP Here

Contents of the KILLDIR2.DOC file

KD - kill directory - Version 1.5
Copyright (c) Mike Bailey 1988. All Rights Reserved.

This program may be copied and distributed freely as long as no changes
are made to the documentary file, the source code or the executable.

Mike Bailey
Madison, WI
May, 1988

This program will delete a directory, all of its subdirectories
and all files contained in those subdirectories. This is a command
line program, which takes the path and directory name to kill and
returns a query (y/n) to make certain that this is what is desired. The
query is necessary since this is a powerful command that kills
the entire tree contained within the chosen directory.

Changed from a previous version: any subdirectory directly off the
one you are in can be named, instead of giving the entire path from

The directory to kill can be named by either method.

Whether it would actually cause problems or not, I rethought allowing
use of the dot '.' as an allowable parameter and eliminated
permitting it, since you could conceivably kill you root directory
using this.

Example directory name: C:\DIRX\DIRTOKILL

The first form of the syntax requires that the full path be entered,
including the drive name, such as KD C:\DIRX\DIRTOKILL.

The second form acceptable, if you are already in C:\DIRX, is to
simply type in KD DIRTOKILL, which will kill DIRTOKILL and everything
contained within it, including all files and subdirectories.

Since I couldn't find any utility to completely delete a directory
and everything in it, including subdirectories, whether they were
empty or not, I finally got around to writing this one. As I
mentioned, this is a fairly powerful utility, so use with caution
and always be sure that you follow the practice of making - at
minimum - weekly backups of your hard disk.

For those who despise being asked whether they are behaving in a safe
and sane manner, I deleted the query whether or not you want to
delete the named directory (y/n)? and recompiled this version as
KDY.EXE, which I'm including with the other files in KILLDIR2.ARC.

If there are any comments, please address them to me on any of the
BBS here in the Madison, WI area.

 December 12, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>