By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

AutoIt FileRecycleEmpty Function

Reference on the FileRecycleEmpty AutoIt Function, used to empty the Recycle Bin.

Edited: 2015-02-13 00:09

The AutoIt FileRecycleEmpty Function is used to empty the Recycle Bin in the operating system. Useful after using the FileRecycle to send files to the Recycle Bin.

If no rootpath is supplied, the Recycle Bin for all drives will be emptied.

This function requires IE4+ installed on the system.

You do not need to Empty the Recycle Bin if you delete files directly, this can be done using the FileDelete Function.

Returns 1 on success and 0 on failure.

AutoIt FileRecycleEmpty Examples

The below example will empty the Recycle Bin for Drive c:


If you want to empty the Recycle Bin for all drives, simply do not enter the rootpath.