Sign in to follow this  
Followers 0
Matrix112

_EmptyRecycleBin UDF

6 posts in this topic

#1 ·  Posted (edited)

Hi,

i wrote this UDF to learn the use of DLL Call. It´s not very useful but a good example. :D

It works, but there is one bug, option 1 won´t work and if i choose 0 it asks if i want to delete a desktop.ini in my Recycle bin. :D

ERecycleBin.au3

;======================================================================================
;
; Function Name: _EmptyRecycleBin($flag)
; Description: Use this function to empty the recycle bin.
; Parameter(s): $flag. Normal=0 No Confirmation=1 No Progress UI=2 Nosound=4
; Requirement(s): Include ERecycleBin.au3
; Return Value(s): none.
; Author(s): Matrix112 <ch.krogmann@gmx.de>
;
;======================================================================================
;
Func _EmptyRecycleBin ($flag)
$path = @HomeDrive
DllCall("shell32.dll","none","SHEmptyRecycleBinA","hwnd",0,"str",$path,"long",$flag)
EndFunc

Example:

#include <ERecycleBin.au3>

$empty = _EmptyRecycleBin (0)
Exit
Edited by Matrix112

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Nice for learning but

isn't this the same:

FileRecycleEmpty()

?

Edited by Daniel W.

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0