When using command prompt or Powershell and the Remove-Item
, del
, or RD
, why don't the items you delete end up in the recycle bin?
-
For a solution on how to use Powershell to move an item to the Recycle Bin, see stackoverflow.com/questions/502002/…– davidmneedhamJan 25, 2018 at 17:59
-
@davidmneedham - Please read the question (again). The author wants to know the reason the deletion of the specific file or folder is permanent and bypasses the recycle bin– RamhoundJan 25, 2018 at 18:01
1 Answer
Long-story short... because backwards-compatibility.
Essentially, del
("rmdir", etc...) is a low-level function that must always work reliably. If you're attempting to recover a system and the disk is 100% full... moving files to a recycle-bin won't assist you in recovering your machine. Similarly, there isn't always a user logged in a machine when del
is executed. Which recycle-bin should it go to? Additionally, developers through generations of time have relied on the simple fact that del
permanently removes files. Changing this behavior would force nearly every software-development company to re-evaluate nearly every product they've ever built to ensure the correct behavior is maintained, or re-write to accommodate the change.
There are 3rd-part tools that implement some additional commands in a command-prompt such-as "recycle" to move to recycling bin... etc..., but this requires you install something else to add this functionality.