Questions tagged [recycle-bin]

In computing, the trash (also known as the recycle bin) is temporary storage for files that have been deleted in a file manager by the user, but not yet permanently erased from the physical media.

In computing, the trash (also known as the recycle bin) is temporary storage for files that have been deleted in a file manager by the user, but not yet permanently erased from the physical media.

Recycle bin functionality is usually integrated into a desktop environment and its file manager. Examples include:

  • Mac OS and Mac OS X, with Macintosh Finder, as Trash (or Wastebasket in defunct localizations)
  • Microsoft Windows, with Windows Explorer
  • GNOME (Linux), with Nautilus
  • KDE (Linux), with Konqueror and Dolphin
  • Xfce (Linux), with Thunar
  • Amiga, when using the WorkBench. The Professional File System added trashcan-esque behavior at the filesystem level.
  • Windows Live, with Skydrive

Resources

Chat Room

Chat about recycle-bin with other Stack Overflow users

236 questions
178
votes
27 answers

Restore a deleted file in the Visual Studio Code Recycle Bin

Using Visual Studio Code Version 1.8.1 how do I restore a deleted file in the recycle bin?
user2584621
  • 2,305
  • 2
  • 15
  • 9
103
votes
8 answers

Send a File to the Recycle Bin

Currently I'm using the following function file.Delete(); But how can I use this function to send a file to the recycle bin instead of just deleting it outright?
muttley91
  • 12,278
  • 33
  • 106
  • 160
93
votes
14 answers

how to empty recyclebin through command prompt?

Usually we delete the recycle bin contents by right-clicking it with the mouse and selecting "Empty Recycle Bin". But I have a requirement where I need to delete the recycle bin contents using the command prompt. Is this possible? If so, how can I…
user1016403
  • 12,151
  • 35
  • 108
  • 137
56
votes
8 answers

How do I move a file to the Recycle Bin using PowerShell?

When using the rm command to delete files in Powershell, they are permanently deleted. Instead of this, I would like to have the deleted item go to the recycle bin, like what happens when files are deleted through the UI. How can you do this in…
Omar Shahine
  • 1,935
  • 3
  • 22
  • 30
38
votes
3 answers

How can I move file into Recycle Bin / trash on different platforms using PyQt4?

I would like to add the next feature to my cross-platform PyQt4 application: when user selects some file and select "remove" action on it that file will be moved to Recycle Bin folder instead of being permantly removed. I think I can find…
bialix
  • 20,053
  • 8
  • 46
  • 63
37
votes
6 answers

Is it possible with Java to delete to the Recycle Bin?

Java is the key here. I need to be able to delete files but users expect to be able to "undelete" from the recycle bin. As far as I can tell this isn't possible. Anyone know otherwise?
drye
  • 1,362
  • 2
  • 15
  • 25
20
votes
7 answers

Move files to Trash/Recycle Bin in Qt

Is there a Qt function to move files to Recycle Bin instead of truly deleting them, for OSes that support it, or do I need to use OS-specific code?
sashoalm
  • 75,001
  • 122
  • 434
  • 781
15
votes
2 answers

How do I detect if a drive has a recycle bin in C#?

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…
Norbert Willhelm
  • 2,579
  • 1
  • 23
  • 33
14
votes
3 answers

How do I restore a file from the recycle bin using C#?

Moving files to the recycle bin and emptying the recycle bin are well documented, but how can a file be programmatically restored from the recycle bin?
Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
14
votes
5 answers

How to Move files to the recycle bin

I need to Move a file to recycle bin in .net 2003 I added microsft.visualbasic.runtime dll from refrence, but I could not able to get filesystem.deletedirectory, So what to do..Can any one help me?
karthik
13
votes
3 answers

Moving files to Trash Can in Linux using C++

I'm trying to move (delete) a file to a Trash Can (in Linux) using C++ (also using QT4 for GUI). Unfortunately it seems to be quite difficult to do so and as far as I can tell there isn't a unified API for it. I would like for my application to run…
Engos
  • 296
  • 1
  • 7
12
votes
3 answers

How can I tell that a directory is the recycle bin in C#?

Given a folder, how can I tell that it is a recycle bin? I've found an answer for C++ but not for C#. My first idea was to check for FileAttributes.System (which would be an acceptable approximation in my case) but actually that flag is cleared on…
mafu
  • 31,798
  • 42
  • 154
  • 247
10
votes
2 answers

How to "safely" delete folder into Recycle Bin

I'm looking for a way to put a folder (with subfolders) into a Recycle Bin with these conditions: It must be done silently -- without any Windows UI. The folder must never be permanently deleted. If it can't be put into Recycle Bin, I'd expect the…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
9
votes
1 answer

Properly move an object to the Trash

It looks like on Cocoa there are many ways to move file/folder-directory to Trash: [[[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation] [[NSWorkspace sharedWorkspace] recycleURLs:] [NSFileManager…
Igor
  • 5,620
  • 11
  • 51
  • 103
9
votes
5 answers

Delete old files in recycle bin with powershell

Ok, I have a script I am writing in powershell that will delete old files in the recycle bin. I want it to delete all files from the recycle bin that were deleted more than 2 days ago. I have done lots of research on this and have not found a…
Dead_Jester
  • 602
  • 6
  • 9
  • 18
1
2 3
15 16