AutoIt FileRecycleEmpty Function

FileRecycleEmpty is used to delete files in the recycle bin.

1237 views

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:

FileRecycleEmpty("c:\")

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

FileRecycleEmpty()

Tell us what you think:

  1. How to declare and work with variables in AutoIt, as well as some background information.
  2. Everything you need to know about working with minimized windows.
  3. How to set the request headers when performing HTTP requests.
  4. This Tutorial will focus on post requests in AutoIt, using the Winhttprequest.5.1 object.
  5. How to use while, for, and do until loops, and how to loop through arrays and object in AutoIt.

More in: AutoIt Tutorials