Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Recyclebin


  • Please log in to reply
10 replies to this topic
poserpro
  • Guests
  • Last active:
  • Joined: --
Greetings,
Just a simple code to clean the recycle bin by clicking on the ahk (its exe with icon is ready) without right-clicking the default recyclebin icon to select clear recyclebin.
If done, a recyclebin sound play, you might need to change to other sound if you like.

FileRecycleEmpty, C:\
FileRecycleEmpty, D:\
FileRecycleEmpty, E:\
FileRecycleEmpty, F:\
FileRecycleEmpty, G:\
FileRecycleEmpty, H:\
SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav
SoundBeep, 2000, 2500 
return

Hope u enjoy it. Any advise is appreciated.

Cheers
-pop

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
Use Driveget List and a parsing loop

Retrieves various types of information about the computer's drive(s).
Source: http://www.autohotke...ds/DriveGet.htm


Perform a series of commands repeatedly: either the specified number of times or until break is encountered.
Source: http://www.autohotke...mmands/Loop.htm



poserpro
  • Guests
  • Last active:
  • Joined: --

Use Driveget List and a parsing loop

Retrieves various types of information about the computer's drive(s).
Source: http://www.autohotke...ds/DriveGet.htm


Perform a series of commands repeatedly: either the specified number of times or until break is encountered.
Source: http://www.autohotke...mmands/Loop.htm


Greetings, hugov
This is my modified version:
FileRecycleEmpty,
DriveGet, OutputVar, Label, C:, D:, E:, F:, G:, H:, I:, J:, K:, L:, 
SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav
SoundBeep, 2000, 2500 
return

Sorry, no idea how to use the loop in this script.

Later
-poserpro

poserpro
  • Guests
  • Last active:
  • Joined: --
maybe

FileRecycleEmpty,
DriveGet, OutputVar, Label, Drive, 
Drive = C,D,E,F,G,H
Loop, parse, Drive, `,
{
    MsgBox, Drive %A_LoopField% is dumped
    SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav
    SoundBeep, 2000, 2500 
}
Return
ExitApp
?

poserpro
  • Guests
  • Last active:
  • Joined: --
Hi,
I wonder, do we really have to assign the drive list, or a simply a FileRecycleEmpty code will do the same ? namely:

FileRecycleEmpty,
SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav
SoundBeep, 2000, 2500 
return


Chicken Pie 4 Tea
  • Members
  • 379 posts
  • Last active: Dec 12 2014 06:46 PM
  • Joined: 18 Aug 2009
I actually prefer your first post as
A) it works
B) I can easily decide which drive it will apply to

this first post is the one I am using , thanks

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
Something like this
DriveGet, Drives, List, Fixed ; get a list of all fixed drives
Loop, Parse, Drives
	FileRecycleEmpty, %A_LoopField%:\

However this can easily be expanded with:
- Ask for which TYPES of drives to include.
- Select which drives to include, e.g. a listview with checkboxes
- Check for errors + status report

poserpro
  • Guests
  • Last active:
  • Joined: --

Something like this

DriveGet, Drives, List, Fixed ; get a list of all fixed drives
Loop, Parse, Drives
	FileRecycleEmpty, %A_LoopField%:\

However this can easily be expanded with:
- Ask for which TYPES of drives to include.
- Select which drives to include, e.g. a listview with checkboxes
- Check for errors + status report


Hi, hugov
In that case, I add the sound effect code:

;Suggested by hugov, Oct 16,2010.
DriveGet, Drives, List, Fixed ; get a list of all fixed drives
Loop, Parse, Drives
SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav
   FileRecycleEmpty, %A_LoopField%:\

Thanks a lots :)
-poserpro

poserpro
  • Guests
  • Last active:
  • Joined: --

I actually prefer your first post as
A) it works
B) I can easily decide which drive it will apply to

this first post is the one I am using , thanks


Hello, HelloWorld ( program guru :p)

Indeed, I liked the first script eariler, but I like the one hugov suggests now.

Cheers
-pop

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
That won't work, you either need
Loop, Parse, Drives
   FileRecycleEmpty, %A_LoopField%:\
SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav ; play only once

or

Loop, Parse, Drives
  {
   SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav ; play for each drive
   FileRecycleEmpty, %A_LoopField%:\
   }
see <!-- m -->http://www.autohotke...mands/Block.htm<!-- m -->

poserpro
  • Guests
  • Last active:
  • Joined: --
Greetings,
Ok, both are good.
;Suggested by hugov, Oct 16,2010. 
DriveGet, Drives, List, Fixed ;  
Loop, Parse, Drives
   FileRecycleEmpty, %A_LoopField%:\
SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav ; play only once


;Suggested by hugov, Oct 16,2010. 
DriveGet, Drives, List, Fixed ;  
Loop, Parse, Drives
  {
   SoundPlay, %A_WinDir%\Media\Recyclebin_Empty.wav ; play for each drive
   FileRecycleEmpty, %A_LoopField%:\
  }

Thanks again:)
-poserpro