System.Shell.RecycleBin.fileCount property

[ 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. ]

Gets the number of files in the Recycle Bin.

This property is read-only.

Syntax

ifileCount = System.Shell.RecycleBin.fileCount

Property value

An Integer that receives the number of files.

Remarks

Folders are not included in the fileCount total; see folderCount.

Examples

The following example demonstrates how to get the total number of files in 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
Sidebar.idl
DLL
Sidebar.Exe (version 1.00 or later)