Dec 262017
 
Small utility to prune entire sub-directories. Non-graphical. C source code included.
File PRUNE.ZIP from The Programmer’s Corner in
Category File Managers
Small utility to prune entire sub-directories. Non-graphical. C source code included.
File Name File Size Zip Size Zip Type
PRUNE.C 1675 729 deflated
PRUNE.DOC 1619 782 deflated
PRUNE.EXE 10190 6321 deflated

Download File PRUNE.ZIP Here

Contents of the PRUNE.DOC file


This is a small utility called PRUNE which is used to prune
entire sub-directories. It will recursively traverse a sub-directory
tree prompt the user when the contents of any directory are about to
be deleted. I am hesitant to writing an "express" version of this
since care must be exercised when deleting entire directories. I
have heard of a graphical type of prune utility which would certainly
look nicer than this implementation.

The source was compiled uder Borland Turbo C++ 2.0 using the
large memory model.

The user can prune any sub-directory on any disk. Just
specify the full path name of the directory you want to prune and
specify the disk if it is different than the current drive.

A few examples (assume your current drive is C:)

1)
prune \tmp

This deletes the directory \tmp along with its any
sub-directories.

2)
prune .

This deletes the contents of the current directory along with
its any sub-directories. Afterward, the program will move up to the
parent directory, if possible, and remove the old current directory.

Now assume the A: drive has the following structure (you're still on
the C: drive).

A:.
DIR3
DIR8
DIR2
DIR4
DIR10
DIR11
DIR12
DIR13
DIR1
DIR9

3)
prune a:\dir4

This will delete \DIR4 and all sub-directories underneath it.

4)
prune a:\

This will delete everything on the A: drive.

Please address any questions and suggestions to

M. Veve

at

HunterLab
11491 Sunset Hills Rd.
Reston, VA 22090



 December 26, 2017  Add comments

Leave a Reply