Share via:

AutoIt FileRecycleEmpty Function

FileRecycleEmpty is used to delete files in the recycle bin.


Edited: 2017-03-26 15:29

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.