Classic Shell
http://classicshell.net/forum/

Empty Recycle Bin button
http://classicshell.net/forum/viewtopic.php?f=8&t=1712
Page 1 of 1

Author:  Yaron [ Thu Nov 14, 2013 1:25 pm ]
Post subject:  Empty Recycle Bin button  Topic is solved

I'd like to add a custom button to empty the Recycle Bin.

I've added the following code to the Registry:
[HKEY_CURRENT_USER\Software\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\empty\command]
"DelegateExecute"=""
@="nircmd.exe emptybin"

What should be the syntax in Classic Explorer -> custom button?

Thank you.

Author:  Gaurav [ Thu Nov 14, 2013 10:35 pm ]
Post subject:  Re: Custom Command Syntax

Windows doesn't have a command line process to empty the Recycle Bin but you can use bin.exe from here: http://www.maddogsw.com/cmdutils/ or emptyrecyclebin.exe from here: http://www.optimumx.com/downloads.html#EmptyRecycleBin

Disclaimer: Classic Shell does not bear any responsibility for third party software recommendations.

Author:  Yaron [ Thu Nov 14, 2013 11:39 pm ]
Post subject:  Re: Custom Command Syntax

Thank you. I appreciate your help.

With your help in another post, I've written the following script in AutoHotkey:
#NoTrayIcon
FileRecycleEmpty
SoundPlay, %A_WinDir%\Media\Windows Recycle.wav, wait


I could have used one of your links or "nircmd.exe emptybin".
http://www.nirsoft.net/utils/nircmd.html

My question is how to use the parameter "emptybin" in Classic Explorer -> Custom toolbar button (Command or Link).
(I prefer the script. I'm just curious as to using parameters in CS).

Author:  Gaurav [ Fri Nov 15, 2013 12:04 am ]
Post subject:  Re: Custom Command Syntax

Oh ok great! If you're a pro with AutoHotkey, then it's even better as it won't show a console window. :D

You enter the parameters right after the executable path in the Command field. Make sure you enclose the path in double quotes and then enter the parameters. e.g.
"C:\Windows\Nircmd.exe" emptybin

You can also use %1, %2 etc. %1 is the path of the current folder. Keep in mind that if the current folder is a root of a drive it will end with a backslash (like C:\) %2 is the path of the selected file (only when a single file is selected). Rest of them are documented in the help file.

Author:  Yaron [ Fri Nov 15, 2013 10:12 am ]
Post subject:  Re: Custom Command Syntax

Thanks again for the detailed explanation. Great!

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/