Notes
- If the string is empty, all Recycle Bins on all drives will be emptied.
sysutils.recyclebin.empty(drive)
Empties the Recycle Bin on the specified drive.
Parameters
drive
Astring
that contains the path of the root drive of the Recycle Bin to empty.
Return value
Returns aboolean
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