JCL Help:DelTree
JCL Help: DelTree Function
Search in JCL Help
Search in all projects
Summary
Recursively deletes a folder.
Pascal
function DelTree(const Path: string): Boolean;
Parameters
Parameters | Description |
const Path: string | The folder to delete. Must be fully qualified. May have a trailing backslash but that's optional. |
Return Value
If the function succeeds in deleting the folder the result is True, if the function fails the result is False. In case of failure the function attempts to delete as much as possible before returning. Thus on failure part of the folder may have been deleted while some files and folders may still exist. Failure is usually due to insufficient access rights or because some files are currently open (locked).
Description
DelTree recursively deletes a folder much like the DOS command. That is, it deletes a folder and everything in it. If parts of the folder tree cannot be deleted, eg because some files may be currently open, the function attempts to delete as much as possible before returning.
See Also
About
Unit
Donator
John C Molyneux
Contributors
Robert Rossmair
Notes
The deletions are permanent! Deletions are not recoverable through the recycle bin.
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page