Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

RecycleOption Enumeration

Note: This enumeration is new in the .NET Framework version 2.0.

Specifies whether a file should be deleted permanently or placed in the Recycle Bin.

Namespace: Microsoft.VisualBasic.FileIO
Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)

public enum RecycleOption
public enum RecycleOption
public enum RecycleOption
 Member nameDescription
DeletePermanentlyDelete the file or directory permanently. Default. 
SendToRecycleBinSend the file or directory to the Recycle Bin

For more detailed information, see the Visual Basic topic RecycleOption Enumeration.

This enumeration is used with the My.Computer.FileSystem.DeleteDirectory Method and the My.Computer.FileSystem.DeleteFile Method.

To protect users against accidental deletion of important files, the Recycle Bin collects deleted files and provides a method for restoring those files. You must explicitly delete the files from the Recycle Bin to make the deletion permanent. Until the files are deleted from the Recycle Bin, the disk space occupied by those files is unavailable for other uses.

Sometimes it is beneficial to bypass the Recycle Bin, especially if you are deleting a large number of files (or a smaller number of very large files) that you are sure are no longer needed, and you want to reclaim the disk space.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.