topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Saturday October 12, 2024, 7:59 pm
  • Proudly celebrating 15+ 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 5618 times)

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Command to empty recycle bin?
« on: September 27, 2007, 09:37 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,277
    • View Profile
    • Donate to Member
Re: Command to empty recycle bin?
« Reply #1 on: September 27, 2007, 10:09 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 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: 689
    • 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 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 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 ... ???