+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
Windows Server 2008 R2 Thread, Home Folder Recycle Bin Deletion in Technical; Hi folks, We are running a 2008 R2 file server, on which are the students home folders. We spotted that ...
  1. #1
    Gongalong's Avatar
    Join Date
    Oct 2011
    Location
    United Kingdom
    Posts
    868
    Thank Post
    776
    Thanked 17 Times in 15 Posts
    Rep Power
    9

    Question Home Folder Recycle Bin Deletion

    Hi folks,

    We are running a 2008 R2 file server, on which are the students home folders.

    We spotted that when students were deleting files/folders, on their Win 7 clients, that the files/folders were going into the file server's recycle bin. The students local recycle bins weren't showing anything though, so this was ultimately pointless. We then used group policy to turn off the recycle bin usage, and to delete files immediately.

    Whether this is related or not, as we migrated file servers last summer, I've spotted a $RECYCLE.BIN folder in many if not all of the students home folders. These folders can have hundreds of MBs of files in. If I browse to them with Windows Explorer the folders appear empty (yes, hidden/system files are turned on), but it's via the wonderful TreeSize that I've spotted the files/folders are there, and TreeSize will delete them.

    The problem is that there are hundreds of these folders, so does anyone know a file explorer type tool that can (a) identify these recycle bin folders on mass e.g. via a search and (b) then delete them?

    TIA

  2. #2

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,641
    Thank Post
    514
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831
    Treesize Pro can handle this, but it isn't free.

  3. Thanks to localzuk from:

    Gongalong (7th March 2012)

  4. #3
    Gongalong's Avatar
    Join Date
    Oct 2011
    Location
    United Kingdom
    Posts
    868
    Thank Post
    776
    Thanked 17 Times in 15 Posts
    Rep Power
    9
    So just to double check, it can search by folder name on mass, and delete on mass?

  5. #4

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,641
    Thank Post
    514
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831
    Quote Originally Posted by Gongalong View Post
    So just to double check, it can search by folder name on mass, and delete on mass?
    Both, yes. We use it here regularly to search for and delete 'Recycler' folders.

  6. Thanks to localzuk from:

    Gongalong (7th March 2012)

  7. #5
    CadlaM's Avatar
    Join Date
    May 2008
    Location
    Hertfordshire
    Posts
    55
    Thank Post
    10
    Thanked 1 Time in 1 Post
    Rep Power
    0
    I'd like to know more on this. It's def' the Win 7 Clients as we have home folders on Server 2003. We also run Ranger for Networks, but that does not seem to be the cause or the solution. Their suggestion was to find and delete the $RECYCLE.BIN that are being created in Ranger folders due to the redirection of pupil desktops, start menu, favourites etc. to the ranger folders. They also suggested permissions on the folders, but the Ranger folders are not supposed to be full perm' for pupils otherwise they'd be writing/ deleting.
    Any Ideas, anyone?

  8. #6
    Gongalong's Avatar
    Join Date
    Oct 2011
    Location
    United Kingdom
    Posts
    868
    Thank Post
    776
    Thanked 17 Times in 15 Posts
    Rep Power
    9
    localzuk: Thanks!

    CadlaM: We also use Ranger, although these folders are created within the home folders, which aren't directed to using Ranger.

  9. #7

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,833
    Thank Post
    875
    Thanked 1,675 Times in 1,458 Posts
    Blog Entries
    12
    Rep Power
    444
    This maybe of use - Redirected My Documents and RECYCLER

    You could put this in a batch file as a logoff / Logon script. It will remove the $RECYCLE.BIN folder. Just change the drive letter to the letter you use for home areas.
    Code:
    rmdir /s /q "H:\$RECYCLE.BIN"
    Last edited by FN-GM; 7th March 2012 at 12:48 PM.

  10. 3 Thanks to FN-GM:

    Gongalong (7th March 2012), Patrickv (24th April 2012), zag (23rd April 2012)

  11. #8

    Join Date
    Mar 2011
    Location
    Bournemouth
    Posts
    280
    Thank Post
    16
    Thanked 74 Times in 64 Posts
    Rep Power
    21
    You can use powershell on your file server and run the following in the root of your home drives folder:

    Code:
    $recycleBins = Get-ChildItem "$RECYCLE.BIN" -Recurse -Force
    foreach ($recycleBin in $recycleBins) { $recycleBin.Delete($true) }

  12. Thanks to ChrisMiles from:

    Gongalong (7th March 2012)

  13. #9
    chazzy2501's Avatar
    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,781
    Thank Post
    213
    Thanked 263 Times in 213 Posts
    Rep Power
    67
    I can't verify this right now but I remember just disabling the recycle bin on the drive that the folder shares are on. Have to double check later.

  14. #10
    Gongalong's Avatar
    Join Date
    Oct 2011
    Location
    United Kingdom
    Posts
    868
    Thank Post
    776
    Thanked 17 Times in 15 Posts
    Rep Power
    9
    Quote Originally Posted by chazzy2501 View Post
    I can't verify this right now but I remember just disabling the recycle bin on the drive that the folder shares are on. Have to double check later.
    It's been disabled via Group Policy now, but the bigger issue are all the remaining system folders that Explorer won't let me browse.

    Thanks to all those with the suggestions for deleting. Much appreciated!

  15. #11

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340
    On your file server, navigate to Control Panel > Folder Options > View, untick Hide protected operating system files (recommended)

    Navigate to a user home directory and at the top right search for recycle

    You can then delete all this and the system will re-create them (as standard).

    By enabling the GPO: User Config > Policies > Admin Templates > Windows Components > Windows Explorer - Do not move deleted files to the Recycle Bin - Enabled this will stop your server quickly filling up!

    Remember to re-tick Hide protected operating system files (recommended) when you're done

  16. 2 Thanks to Michael:

    Gongalong (12th March 2012), zag (23rd April 2012)

  17. #12

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340
    On a related issue, if ever you get users with a corrupt Recycle bin message (on logon) the above method works too to resolve this error.

  18. Thanks to Michael from:

    Gongalong (12th March 2012)

  19. #13
    Gongalong's Avatar
    Join Date
    Oct 2011
    Location
    United Kingdom
    Posts
    868
    Thank Post
    776
    Thanked 17 Times in 15 Posts
    Rep Power
    9
    I hadn't though to just search for the folders and delete them, versus trying to open all said folders and then delete the contents. Doh!

    I did try TreeSize Professional, which accidentally helped me spot about 25GB of Cert 18 films, but couldn't figure out how to find folders with it. Files were easy. It doesn't help that this is a file server with 2 million files in the home folder directory :-/ JAM Software does have a free file search tool which looks to be that particular part of TreeSize Professional, plus also a free PC stress testing tool, albeit also a side issue :-)

  20. #14

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,833
    Thank Post
    875
    Thanked 1,675 Times in 1,458 Posts
    Blog Entries
    12
    Rep Power
    444
    Quote Originally Posted by ChrisMiles View Post
    You can use powershell on your file server and run the following in the root of your home drives folder:

    Code:
    $recycleBins = Get-ChildItem "$RECYCLE.BIN" -Recurse -Force
    foreach ($recycleBin in $recycleBins) { $recycleBin.Delete($true) }
    Is this code correct, it doesnt seem to work for me. Thanks

  21. #15
    CadlaM's Avatar
    Join Date
    May 2008
    Location
    Hertfordshire
    Posts
    55
    Thank Post
    10
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by Michael View Post
    By enabling the GPO: User Config > Policies > Admin Templates > Windows Components > Windows Explorer - Do not move deleted files to the Recycle Bin - Enabled this will stop your server quickly filling up!

    Michael,
    No problem deleting errant recycle bins, but, before I do the (sensible looking ) GPO change... On my system, Server 2003/WIn XP AD with Ranger For Networks, we never see the recycle bin on the desktop. I am guessing that this is surpressed by Ranger.

    Or is this normal on a vanilla system too? Anyone?

    We have "Previous Versions" and daily backups, so Dusty Bin is not missed by anyone.

    On Win 7 with Ranger I don't see the Recycle bin on Desktop, but Win keeps creating them on every new logon to 7 in the ranger desktop/favorites/cookies redirected folders.
    So I think your GPO fix with stop that with 7.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2011, 02:12 PM
  2. Unshare/delete multiple home folders
    By DreCon in forum Windows
    Replies: 2
    Last Post: 5th October 2010, 03:04 PM
  3. Mass Delete Users Home Folders
    By Techie101 in forum Windows Server 2000/2003
    Replies: 4
    Last Post: 13th July 2009, 03:26 PM
  4. Replies: 5
    Last Post: 9th March 2008, 12:15 AM
  5. Urgent Help!!! Year 10 folders have been deleted
    By StewartKnight in forum Windows
    Replies: 37
    Last Post: 9th December 2005, 08:22 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •