Prune - remove a branch of the directory tree

You know the problem: you have a program on your hard disk that you want to remove. It is in its own subdirectory, but underneath this are subsubdirectories, and underneath them subsubsubdirectories, all containing files to be deleted. Under DOS, you have to start at the bottom level, delete all the files, then the subsubsubdirectories, then delete all the files in the subsubdirectories followed by the subsubdirectories themselves, then delete all the files in the main subdirectory and finally delete the subdirectory. Very tedious.

Well, XTree Gold has a command which deletes a whole directory branch at once. It is Prune, invoked by keying Alt-P from the directory window. It is of course a potentially very dangerous command, so XTGOLD insists that you confirm it by typing the word PRUNE.

When using Prune you may occasionally encounter an error message denying you access to the directory. This usually means that the actual contents of one of the subdirectories beneath the current directory is not what XTGOLD thinks it is. This situation often arises when you have been executing a program from within XTGOLD. If this program has created or deleted any files, XTGOLD will not be aware of this unless you relog the directory, branch or disk. The easy way to overcome this is to key * from the directory window, which relogs the branch.

Another possible cause of Prune failure is if one or more of the files to be pruned has its attributes set to System, Hidden or Write-protected. XTGOLD's error message will tell you if this is so, and the A(ttribute) command will allow you to correct it. Key B to show all the files in the branch to be pruned, Ctrl-T to tag them, then Ctrl-A followed by  -R-S-H and return (after you have done this once, you can summon -R-S-H from the history by using the up-arrow).

Tom Ruben

up to XTree tips index