Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 02, 2016, 04:16:28 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Command to empty recycle bin?  (Read 3069 times)

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Command to empty recycle bin?
« on: September 27, 2007, 09:37:45 PM »
I want to create a button for emptying recycle bin and put it at the top of my screen using PowerPro. I tried

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...ds/detail.asp?id=298, if possible)
<a href="https://sridharkatakam.com">My blog</a>

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: Command to empty recycle bin?
« Reply #1 on: September 27, 2007, 10:09:08 PM »
this AHK command could do the trick: FileRecycleEmpty.

Empties the recycle bin.FileRecycleEmpty [, DriveLetter]

jacidbazz

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 11
    • View Profile
    • Donate to Member
Re: Command to empty recycle bin?
« Reply #2 on: September 27, 2007, 10:15:38 PM »
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: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: Command to empty recycle bin?
« Reply #3 on: September 27, 2007, 10:50:56 PM »
Thanks lanux and jacid.
<a href="https://sridharkatakam.com">My blog</a>

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: Command to empty recycle bin?
« Reply #4 on: September 27, 2007, 11:31:26 PM »
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 ... ???