# File_DelTree

> Deletes folder and all subfolders.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/file-functions/file-deltree/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

#### Description

Deletes folder and all subfolders

### Syntax

File_DelTree(sDir,bForce) As Boolean

### Parameters

#### sDir (String)

Rootpath to be removed

#### bForce (Boolean)

Ignore attributes

### Example

**VBScript**

```vb
If bStatus Then bStatus = File_DelTree("C:\CapaInstaller", True)
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[File_CreateDirectory](/capainstaller/vb-scripting-library/file-functions/file-createdirectory/) [File_DelFile](/capainstaller/vb-scripting-library/file-functions/file-delfile/) [File_ExistDir](/capainstaller/vb-scripting-library/file-functions/file-existdir/) [File_ExistFile](/capainstaller/vb-scripting-library/file-functions/file-existfile/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
