> 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-guide/file-and-folder/delete-folder.md).

# Delete folder

Delete folder is an action 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.

🎥 Watch the tutorial video: [Here](https://youtu.be/EH7olDLAb9c).

#### 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`).

#### Practical example: Automatically clean up the cache folder after running 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 raw video files, separate audio files, and data generated during the rendering process.

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

* Configuration method: In 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 not worry about running out of memory after a long period of automated operation.

<figure><img src="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-4f11bfc6034a2100e148e74c45b42e8b40c8c81c%2Fff-16.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
