sysutils.recyclebin.empty(drive)

Empties the Recycle Bin on the specified drive.

Parameters

drive

A string that contains the path of the root drive of the Recycle Bin to empty.

Notes

  • If the string is empty, all Recycle Bins on all drives will be emptied.

Return value

Returns a boolean value indicating if the operation succeeded.

Example

local sysutils = require "sysutils" -- Try to empty the Recycle Bin of "C:\\" drive if sysutils.recyclebin.empty("C:\\") then print("Successfully emptied the C:\\ Recycle Bin") else print("Failed to empty C:\\ Recycle Bin") end