> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guides/file-and-folder/delete-folder.md).

# Delete folder

The delete folder action is used to completely remove a directory from the computer's hard drive at the specified path. When executed, this action will thoroughly scan and delete all files as well as subdirectories contained within it.

> ⚠️ Extremely important note: The folder deleted by this action will be permanently destroyed and will not be in the Windows Recycle Bin. You need to carefully check the path to avoid mistakenly deleting system folders or important data on the computer.

#### Configuration parameters:

* Folder Path: The absolute path to the folder that needs to be deleted on the computer (e.g., `D:\GPM_Data\temp_cache`).

#### Real-world example: Automatically clean up the cache folder after completing the workflow

When you write a script to download short videos (Shorts, Reels, TikTok) to your computer for processing, editing, and then uploading to another channel. The script will typically create a temporary folder to hold the raw video files, separate audio files, and data generated during the rendering process.

After the script successfully uploads the videos to the platforms, you need to delete this temporary folder to free up space on the hard drive:

* Configuration method: At the final step of the script, you call the Delete folder action.
  * Folder Path: Enter the path of the temporary folder used, for example: `D:\GPM_Softwares\Render_Temp`.
* Result: The system will completely delete the `Render_Temp` folder along with all the junk files generated inside. Your computer will always be clean, run smoothly, and you won't have to worry about running out of memory after a long period of automated hanging.

<figure><img src="/files/lcOOHAhVNp190xlO62wT" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-en/action-guides/file-and-folder/delete-folder.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
