This is a simple button which empties the Recycle Bin, and where the button's icon changes to indicate if the Recycle Bin is empty or not.
It uses the Windows Recycle Bin icons from shell32.dll. (Icon IDs 31 and 32.)
The "full" icon is the button's default image. Within the command, the
@icon modifier is used to override the icon when the recycle bin is empty.
RECYCLEBINEMPTYis a special condition built in to Opus for exactly this purpose. But you can also test for things like variables set by commands and scripts.
FORCEargument from the last line if you'd like to see a confirmation dialog before anything happens (assuming you have Windows set to confirm emptying the recycle bin).
QUIETargument to the last line if you'd like to prevent any progress dialog while the recycle bin is being emptied.
Tip: When editing a button which uses
@icon, hold Ctrl and click where it says @icon to open an image picker, so you don't have to manually work out the path and icon ID.
An older way of doing something similar was posted here: