DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Command to empty recycle bin?  (Read 6,915 times)

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
Command to empty recycle bin?
« on: September 28, 2007, 02:37 AM »
I want to create a button for emptying recycle bin and put it at the top of my screen using PowerPro. I tried

Code
cmd.exe del \C C:\RECYCLER\?*.*

but that didn't delete the contents.

Any ideas? (w/o using another program like http://www.nirsoft.net/utils/nircmd.html or http://www.appdeploy.com/downloads/detail.asp?id=298, if possible)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: Command to empty recycle bin?
« Reply #1 on: September 28, 2007, 03:09 AM »
this AHK command could do the trick: FileRecycleEmpty.

Empties the recycle bin.FileRecycleEmpty [, DriveLetter]

jacidbazz

  • Participant
  • Joined in 2007
  • *
  • Posts: 11
Re: Command to empty recycle bin?
« Reply #2 on: September 28, 2007, 03:15 AM »
PowerPro has a built in command for this. Under the *Exec menu is "EmptyRecycleBin". From the help...

Empties the recycle bin. Use checkboxes to control confirmation and whether sound is played and animation shown. Unavailable on early Win95 versions unless IE4 or later has been installed.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
Re: Command to empty recycle bin?
« Reply #3 on: September 28, 2007, 03:50 AM »
Thanks lanux and jacid.

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
Re: Command to empty recycle bin?
« Reply #4 on: September 28, 2007, 04:31 AM »
Here's a .js script to do that:

shl = new ActiveXObject("Shell.Application");
bin = shl.NameSpace(10);
bin.Self.InvokeVerb("Empty Recycle &Bin");

Also, Recycle Bin in Quick Launch might be a useful tweak for some ... ???

Original address: https://www.donationcoder.com/forum/index.php?topic=10164.0