Disable creation of $recycle.bin folder?

Page 1 of 2 12 LastLast

  1. Posts : 8
    Windows 7 64bit
       #1

    Disable creation of $recycle.bin folder?


    Is there any way to disable the creation of the $recycle.bin folder in the root directory of all harddrives? Disable all recycle bin functions globally & permanently?

    In the recycle bin properties I've chosen to delete all files directly and not move them to the recycle bin, yet everytime I connect a new harddrive (I've got 8 hot-swap bays), this option is reset for that particular drive and Windows 7 creates a $recycle.bin folder in the root directory. It really annoys me.
      My Computer


  2. Posts : 5,642
    Windows 10 Pro (x64)
       #2

    Turn off show hidden files....You'll never see it again.
      My Computer


  3. Posts : 8
    Windows 7 64bit
    Thread Starter
       #3

    That's not what I am asking for. That's like closing your eyes to the problem. :)

    I don't want that directory on the drive, at all.

    Doesn't solve the problem that Windows 7 resets the setting to directly delete files for every new drive I attach either.
      My Computer


  4. Posts : 5,642
    Windows 10 Pro (x64)
       #4

    Well you are looking for a solution to a problem that doesn't have a solution. So what am I suppose to say?
      My Computer


  5. Posts : 8
    Windows 7 64bit
    Thread Starter
       #5

    I couldn't tell from your first reply that there's no solution, so I guess that's what you should have said.

    I was hoping there would be some registry hack, some service to disable, or some third party tool that could completely disable the recycle bin.
      My Computer


  6. Posts : 72,043
    64-bit Windows 11 Pro for Workstations
       #6

    Hello Trond,

    Sorry, but you cannot disable or get rid of the Recyle Bin since it is integrated into Windows 7. You can however have it set to delete files immediately instead of them being placed in the Recycle Bin first, and remove the Recycle Bin from the desktop.

    Hope this helps,
    Shawn
      My Computer


  7. Posts : 8
    Windows 7 64bit
    Thread Starter
       #7

    Thanks, but as I wrote in the initial post, I've already done that. The other problem, as I wrote, is also that everytime I attach a new drive, that setting is reset on the new drive.

    In XP, you can use GPEdit to enable "Do not move deleted files to Recycle Bin". This permanently disables the Recycle Bin on all drives, also new drives that you attach, and works very well on an old XP computer I got.

    I've yet to find such a global setting in Windows 7. Unfortunately, I use Home Premium, it doesn't have GPEdit so I don't know if that option exists in Windows 7 also. But all settings in GPEdit should have a registry equivalent, so if GPEdit in Windows 7 Pro+ do have this setting, perhaps it's possible to enable it in the registry.
      My Computer


  8. Posts : 3
    Windows 7 Ultimate
       #8

    You could look in this excel spreadsheet and see if there's an entry. Excel 2007 format.
    Disable creation of $recycle.bin folder? Attached Files
      My Computer


  9. Posts : 1
    Win 7 Ultimate 64-bit
       #9
    Last edited by Brink; 15 Jun 2010 at 08:54. Reason: replaced link
      My Computer


  10. Posts : 1
    Windows 7 Ultimate x64
       #10

    Yes this can be done... because I got annoyed that it can't be done so I wrote a script to do it (see below). It works for me but if you have any issues yourselves you may need to tweak it a bit. Have fun :).

    Code:
    ' Author:      HSV Guy
    ' Description: Script to remove Recycle Bin folder. Run on Windows startup or login.
    ' Notes: 1)    See https://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create.html
    '              for how to run programs/scripts with elevated permissions without a UAC prompt.
    '        2)    Update value of RECYCLEBIN as per version of Windows (configured for Windows 7).
    ' Date:        1 April 2011
    
    Dim SILENT
    SILENT = TRUE
    
    Call RunElevated
    
    Dim filesys, drv, drvcoll, folder, RECYCLEBIN
    RECYCLEBIN = ":\$Recycle.Bin\"
    
    Set filesys = CreateObject("Scripting.FileSystemObject")
    Set drvcoll = filesys.Drives
    
    
    For Each drv in drvcoll
      If drv.IsReady And filesys.FolderExists(drv.DriveLetter & RECYCLEBIN)  Then
         Set folder = filesys.GetFolder(drv.DriveLetter & RECYCLEBIN)
    	 MyMsgBox "About to delete: " & folder
    	 folder.Delete
      Else
        MyMsgBox "Skipped " & drv.DriveLetter & ". Folder doesn't exist or device not ready."
      End If  
    Next
    
    'Source code of RunElevated function shamelessly taken from:
    ' http://www.insidethe.com/blog/2009/12/how-to-launch-a-wsh-vbscript-as-administrator-in-windows-7-and-vista/
    Function RunElevated
    	If WScript.Arguments.Named.Exists("elevated") = False Then
    		'Launch the script again as administrator
    		CreateObject("Shell.Application").ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ /elevated", "", "runas", 1
    		WScript.Quit
    	Else
    		'Change the working directory from the system32 folder back to the script's folder.
    		Set oShell = CreateObject("WScript.Shell")
    		oShell.CurrentDirectory = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
    		 MyMsgBox "Now running with elevated permissions" & SILENT
    	End If
    End Function
    
    Function MyMsgBox(Message)
    	If Not SILENT Then MsgBox Message
    End Function
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:33.
Find Us