---
title: "How to programatically clear the recycle bin under Windows?"  
description: "How to programatically clear the recycle bin under Windows?"  
author: "Anonymous User"  
published: 2013-11-14  
updated: 2013-11-14  
canonical: https://www.mindstick.com/forum/1732/how-to-programatically-clear-the-recycle-bin-under-windows  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to programatically clear the recycle bin under Windows?

I' m developing a [window](https://www.mindstick.com/forum/161285/how-does-the-window-console-object-work-in-javascript) [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) and I have a [option](https://www.mindstick.com/forum/159391/jquery-get-selected-option-from-dropdown) to clear th [recycle bin](https://www.mindstick.com/articles/1716/change-recycle-bin-settings-in-windows-os) of [windows](https://www.mindstick.com/articles/311752/how-to-install-and-use-the-google-wifi-software-on-a-windows-or-mac-computer) on [button click](https://www.mindstick.com/forum/790/form-gets-submiited-twice-on-button-click) .How to achieve this?

## Replies

### Reply by Pravesh Singh

Hi jacob,\
You can use SHEmptyRecycleBin() function from shell32.dll library.


---

Original Source: https://www.mindstick.com/forum/1732/how-to-programatically-clear-the-recycle-bin-under-windows

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
