28

From a Windows workstation when I delete files over the network (e.g. a file share, server disk, etc) those files are never put into a trash can, either on my Windows workstation or on the server - they're instantly and permanently deleted. This has always sucked IMHO.

Is there a software that, in this scenario, puts the files into a trash can somewhere for easy undelete?

Maybe a Windows policy change, registry setting value, software utility, etc ?

--
Looking for a specific solution instead of general "Hey look into this, or try this". I'm convinced somebody has already solved this and can explain it. Thanks.

2
  • Since the files aren't on your drive they would have to be copied to your local drive then placed in the recycle bin. This is very time consuming and would be a waste of network traffic (in most cases) so what Windows does is it just tells the remote networked system that it shoudl delete that file itself.
    – Daisetsu
    Commented Jul 15, 2010 at 23:45
  • @Daisetsu they don't. The recycle bin is created on the same drive the files are deleted from (so the recycle bin can be on the network, and the files can be "recycled" by moving there which will not require copying, same as for the local drives). The process of file moving and deletion is identical for local and network filesystems, and there are no guarantees the local filesystem is any faster than the network one. So the fact Explorer wastes local disk time without any doubt, while quailing about the network FS, is pure nonsense. Commented Nov 9, 2024 at 4:56

8 Answers 8

8
+50

A network recycle bin doesn't exist, there is two ways around it:

  • Use shadow copies or back-ups to prevent lost data.

    Locally the Recycle Bin is part of Windows Explorer -- and on the network you are NOT dealing with explorer on the server. Explorer locally isn't going to copy the file to the user's workstation just to put it into the recycle bin.

    You CAN implement Shadow Copy however, then users can undelete and compare versions.

    From: http://www.eggheadcafe.com/software/aspnet/30136686/network-drive-recycle-bin.aspx

  • Instead of pressing delete, move the file to the recycle bin.

    The provided link also suggests NetrBin as Revolter says,
    the big problem behind it is that every time you delete you transfer the file first.

1
  • moving a file within almost any filesystem does not require moving (or downloading) its data. The fact that Explorer refuses to look for or create a recycle bin on the network share is just a bad design decision. Commented Nov 9, 2024 at 4:40
11

It's a shame that an easy and effective answer has been downvoted on here. Othniel Cressy's steps do solve the problem without needing any extra software. I don't have enough reputation to upvote him or comment on his post so I'm having to reply here instead but it's a great solution for people!

All you need to do is set the location of one of your Personal Folders to the root of the network drive and Windows automatically adds that location to the Recycle Bin. I use the "Contacts" folder as I have no other use for it, but you can use "My Music" or "My Games".

  1. Right click on the Personal Folder you don't use (e.g. Contacts) and choose Properties
  2. Find the Location tab
  3. Click Move... and set the new location to the root of the Network Drive
  4. I chose to not move existing files, there shouldn't be any anyway.

Done. Check your Recycle Bin locations and you should see your network drive on there! I found this a great tip so I hope it helps others.

3
  • The interesting part is, such manoeuver works way earlier than the mydigitalinfo post appeared. Personal tests indicates it works for as early as Windows ME and 2000. (there was only a single "My Document" folder at that time) Commented May 6, 2019 at 3:00
  • This is OK if you only have 1 user accessing the share, but for multiple users it won´t work since recycle bin contents description is saved locally.
    – cyberponk
    Commented Jan 9, 2024 at 13:34
  • he is downvoted correctly, as he just posted the link which is broken now. I upvoted your answer. Commented Nov 9, 2024 at 4:43
5

I came across an utility when I was searching this issue

people, on the way, says Microsoft does not handle deletes over networks shares ! looks true. can't find more details yet...

NetrBin, (Network recycle bin), is for this purpose, it moves deleted files from network drives to the recycle bin for later backups. (i didn't test it) so you may want to try it.

alt text

1
  • 3
    It also leaves copies of potentially sensitive networked files lying around on workstations and/or laptops. Commented Feb 22, 2017 at 23:14
2

Following these steps, when you delete files on the server, they are saved to your local recycle bin. I found it handy. The steps are simple.

3
  • 8
    Can you summarize the steps in that link, so that if the link goes dead, your answer is still useful? Commented Sep 19, 2013 at 22:54
  • 1
    This approach does move all of the files from the personal folder to the network share, which may not be desirable in an office environment. Commented Feb 22, 2017 at 23:16
  • the link is broken // see Duncan's answer above // @CraigTullis not all, just a single (likely useless) folder. Commented Nov 9, 2024 at 4:42
2

Dump from Othniel Cressy links.

A few years ago I discovered how redirected user profile folders in Windows get Recycle Bin protection, even when the folders are redirected to a network location. This was a huge find for me, and I used this feature to add Recycle Bin coverage to some of my mapped network drives. I shared this information on another forum here: http://forums.mydigitallife.info/threads/16974-Tip-Network-Recycle-bin Today I figured out a better way to achieve the same goal that doesn't rely on user profile folder redirection, and am sharing that information for other users to try out. You might want to take a look at these forum topics for additional information: http://technet.microsoft.com/en-us/library/cc787939(v=ws.10).aspx http://blogs.technet.com/b/askds/archive/2012/07/16/managing-the-recycle-bin-with-redirected-folders-with-vista-or-windows-7.aspx http://msdn.microsoft.com/en-us/library/bb882665.aspx http://social.technet.microsoft.com/Forums/windowsserver/en-US/10bfcfb9-14f3-434e-9ffa-0289b8b32e01/folder-redirection-recycle-bin The standard disclaimer applies - this might break stuff. I've only tested in Windows 8, and my testing is limited. Try this at your own risk. This is what I've learned (or think I've learned - I might be wrong): Windows Vista and later store the configuration settings for the Recycle Bin for redirected user profile folders in this registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\KnownFolder Under this key are separate keys for each redirected folder that is protected by the Recycle Bin. The keys contain the configuration information for each protected folder, and are named to match the GUIDs for "Known Folders." A list of the Known Folder to GUID mappings is available in one of the links above. The registry also contains a list of "known folders" at this location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions

So, I reasoned that if I could create my own custom "known folder," I could add that to the list of folders that were protected by the Recycle Bin and protect any mapped network drive I wanted. So I looked at the list of existing "known folders" and created a key that was similar to the Documents key. I then fiddled with the values in the key until I narrowed it down to the minimum number needed to make the recycle bin work. This .reg file will protect a mapped X: drive with a ~50GB recycle bin. You should modify the file to fit your needs: Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDes> criptions{9147E464-33A6-48E2-A3C9-361EFD417DEF}] "RelativePath"="X:\" "Category"=dword:00000004 "Name"="XDrive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\KnownFolder{9147E464-33A6-48E2-A3C9-361EFD417DEF}] "MaxCapacity"=dword:0000c7eb "NukeOnDelete"=dword:00000000

A few

things of note: The GUID in the above .reg file {9147E464-33A6-48E2-A3C9-361EFD417DEF} came from this PowerShell command: "{"+[guid]::NewGUID().ToString().ToUpper()+"}" Each "known folder"/Recycle Bin combination requires a unique GUID. If you don't want to use PowerShell to generate a GUID, you can use an online GUID generator. I don't know what the "Category" value does, but the key I copied had it set to 4, and that works, so I didn't test any other values. The "Name" value is required, but is not the name that will be shown if you right-click on the Recycle Bin and select properties. (At least not in my environment.) In my environment, the name that is shown is the name of the network drive. Making this change adds a "Location" tab to the properties page of your mapped network drives. I suspect this could be removed by changing the "Category" value, but didn't bother to find out. I only tested with mapped network drives. I suspect this would work with UNC paths as well, but I didn't bother testing. I hope you're as excited to find this as I was to figure it out. Let me know if this works for you. I now plan to deploy the registry keys with Group Policy Preferences and will update this forum post with any information I discover. Best regards

--Russel Update: I am now using Group Policy Preferences to deploy the needed registry keys, and all my mapped network drives are now protected by the recycle bin. Update 2: I have tested now with UNC paths, and this works fine. I still use mapped network drives, but if your environment requires UNC paths instead, you can use them. Note however that if you have a mapped network drive that points to a UNC path, and you protect the UNC path with a registry change, if a user deletes a file from the mapped network drive that points to that UNC path, the file will be permanently deleted. See below for more details.

2
1

"To implement the network recycle folder Samba uses a Virtual File System (VFS) module." -- In short, you'll need to configure the network share (rather than the client) for most of the solutions I've used.

A quick search found this information from RedHat.com:

http://www.redhat.com/advice/tips/sambatrash.html

A more in-depth guide can be found here:

http://pl.samba.org/samba/docs/Samba-HOWTO-Collection.pdf (p551)

JDB

6
  • Thanks for a solution. I'm not using SAMBA, just regular Windows facilities. Is there a solution without using something this large? It seems a little heavy for my situation - I'm searching more so for a software utility, registry setting or simpler software fix instead of an entire networking alternative.
    – John K
    Commented Jul 7, 2010 at 16:53
  • 1
    Samba is regular windows facilities... Link 1 however is for linux, and I think that the second one is too.
    – TheLQ
    Commented Jul 7, 2010 at 20:02
  • Hungry - Are you using basic file-sharing? What version of Windows are the hosts running? Everything I've found dictates that this is a server level change - so even with basic file-sharing this is a server (host) change. However... there are client level programs that basically cache the file locally to allow you to undelete them - including shadowcopy and winundelete (I've not used either). This discussion has a nice review: techreport.com/forums/viewtopic.php?f=14&t=64362
    – JDB
    Commented Jul 8, 2010 at 19:34
  • various workstations XP thru Windows 7 connecting to Server 2003 and 2008. Shadowing rings a bell - I recollect some suite of security tools having it - not so fond. You might be correct. I'll look deeper into the info you provided. Thansk.
    – John K
    Commented Jul 9, 2010 at 14:53
  • Please provide all of the necessary steps in your answer. Being diverted elsewhere to try and browse and figure it out ourselves is only a little better than saying, "Google it."...and now your 1st link is dead. Commented Apr 6, 2017 at 1:21
1

Years ago, i finally found the software replacing the recycle bin, starting with the 2 researched features, that is handle of : - files deleted from the network - files moved

This software were "Undelete" from Executive software http://www.executivesoftware.com. Unhappily, their activity stopped around 2003-2004. My release is still working under windows xp and didn't try under seven but i have doubts.

I saw your question yesterday and i found Undelete from Diskkeeper web site. The name and the features seem the same, didn't yet try the eval but i feel there is some good hope Diskeeper bought Executive software.

After a google search, the "Executive software" terms are often used on the diskkeeper web site so maybe a beginning of answer. Whatever, i invite you to try it.

-1

You could make a network folder called "Recycle Bin" and just move files to it.

1
  • Poor solution in my opinion, as it won't auto-track deletion time or original path (for restoring the deleted items), and is a bit of a pain in the butt as a manual work-around. Commented Apr 6, 2017 at 1:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .