System.Shell.RecycleBin.emptyAll method
[ The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]
Deletes all items from the Recycle Bin.
Syntax
System.Shell.RecycleBin.emptyAll()
Parameters
This method has no parameters.
Return value
This method does not return a value.
Remarks
The Recycle Bin Properties settings determine how file deletion is handled. For example, whether files are deleted immediately or stored until the Recycle Bin is emptied, whether the Recycle Bin is system-wide or operates on a per-drive basis, and whether confirmation dialogs are displayed.
Examples
The following example demonstrates how to empty the Recycle Bin.
// --------------------------------------------------------------------
// Empty the Recycle Bin.
// --------------------------------------------------------------------
function EmptyRecycleBin()
{
var intFileCount = System.Shell.RecycleBin.fileCount;
var intFolderCount = System.Shell.RecycleBin.folderCount;
System.Shell.RecycleBin.emptyAll();
spFeedback.innerHTML = intFileCount + " file(s) deleted.<br/>";
spFeedback.innerHTML += intFolderCount + " folder(s) deleted.";
}
Requirements
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
End of client support |
Windows 7 |
End of server support |
Windows Server 2008 |
IDL |
|
DLL |
|