I have an application which uses the FOF_ALLOWUNDO with SHFileOperation in order to move files to the recycle bin.
Some removable drives do not have a recycle bin. In this case SHFileOperation deletes the files directly. I want to give a warning to the user that the files are going to be deleted directly.
In order to do this I need to know if the drive has a recycle bin.
To see the location of the Recycle Bin on your Windows computer, you will have to first show protected operating system files via the Control Panel, Folder Options applet. Once you have done that, open your C Drive. You will see the $Recycle. Bin folder.
The Recycle Bin is a special set of folders that are located in a hidden folder or file (C:\$Recycle. Bin for modern versions of Windows, C:\recycler for Windows XP and older versions).
Each user account on the PC will have their own separate Recycle Bin, and will be referenced by their Security Identifier (SID) in each drive's $Recycle. Bin. Items in the Recycle Bin still take up hard disk space and can be undeleted or restored back to their original location.
Use FOF_WANTNUKEWARNING.
Send a warning if a file is being permanently destroyed during a delete operation rather than recycled. This flag partially overrides FOF_NOCONFIRMATION.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With