# IRPCValueLists.RemoveOrDestroyTraditionalFolder

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Value lists](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/RemoveOrDestroyTraditionalFolder/

Badges: `Vault API / core` `write` `session or assertion` `returns metadata structure version`

Deletes or destroys a traditional folder and everything in it.

- **Service:** [Value lists](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/index.md) `MFiles.IRPCValueLists`
- **gRPC method:** `/MFiles.IRPCValueLists/RemoveOrDestroyTraditionalFolder`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/remove-or-destroy-traditional-folder`
- **Request:** [`RemoveOrDestroyTraditionalFolderRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/RemoveOrDestroyTraditionalFolder/index.md#request)
- **Response:** [`RemoveOrDestroyTraditionalFolderResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCValueLists/RemoveOrDestroyTraditionalFolder/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires the vault rights `license_allows_modifications` and `manage_traditional_folders`,
  and read access to the folder.
- With `destroy` true the folder and its contents are destroyed permanently.

<a id="request"></a>

## Request: RemoveOrDestroyTraditionalFolderRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `folder_structure` | `int32` | Must be 4 (Traditional folders); any other value fails. |
| `folder` | `int32` | The item ID of the folder. |
| `destroy` | `bool` | True to destroy the folder and its contents permanently, false to mark them deleted. |

<a id="response"></a>

## Response: RemoveOrDestroyTraditionalFolderResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `objects[]` | repeated [`ObjID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjID/index.md) | The IDs of the objects that were deleted or destroyed. |
| `objects[].type` | `int32` | The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID). |
| `objects[].item_id` | [`ItemID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ItemID/index.md) | The ID of the object within its type, in `item_id.internal_id`. |
| `objects[].item_id.internal_id` | `int32` | The ID of the object or value list item. |
| `objects[].item_id.external_repository_id` | [`ExternalRepositoryID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ExternalRepositoryID/index.md) | Used only for objects in external repositories (external connectors). Leave it unset for objects stored in the vault. |
