Deleting a directory
You can delete a directory by using the removeDirectory function as shown in the following example:
<cfset removeresponse = cfclient.file.removeDirectory(“myNewDir”)>
removeDirectory(dirPath,recurse) - Delete specified directory
- returns – a boolean to indicate the success of operation
- dirPath – The absolute or relative path to the directory that needs to be deleted (including the directory name).
- recurse - boolean to indicate whether the directory should be removed recursively.