Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Disable creation of $recycle.bin folder?


08 Dec 2009   #1

Windows 7 64bit
 
 
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 System SpecsSystem Spec
.

08 Dec 2009   #2

Windows 8.1 Pro (x64)
 
 

Turn off show hidden files....You'll never see it again.
My System SpecsSystem Spec
08 Dec 2009   #3

Windows 7 64bit
 
 

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 System SpecsSystem Spec
.


08 Dec 2009   #4

Windows 8.1 Pro (x64)
 
 

Well you are looking for a solution to a problem that doesn't have a solution. So what am I suppose to say?
My System SpecsSystem Spec
08 Dec 2009   #5

Windows 7 64bit
 
 

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 System SpecsSystem Spec
08 Dec 2009   #6
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

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 System SpecsSystem Spec
09 Dec 2009   #7

Windows 7 64bit
 
 

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 System SpecsSystem Spec
09 Dec 2009   #8

Windows 7 Ultimate
 
 

You could look in this excel spreadsheet and see if there's an entry. Excel 2007 format.


Attached Files
File Type: zip WindowsServer2008R2andWindows7GroupPolicySettings.zip (573.3 KB, 743 views)
My System SpecsSystem Spec
15 Jun 2010   #9

Win 7 Ultimate 64-bit
 
 

My System SpecsSystem Spec
01 Apr 2011   #10

Windows 7 Ultimate x64
 
 

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 http://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 System SpecsSystem Spec
Reply

 Disable creation of $recycle.bin folder?




Thread Tools



Similar help and support threads for2: Disable creation of $recycle.bin folder?
Thread Forum
How to disable creation of BootCKCL.etl Performance & Maintenance
Solved Disable Automatic System Restore Point Creation? Backup and Restore
How to disable automatic restore point creation Backup and Restore
Disable user password creation & more System Security
?Recursive? folder creation? Performance & Maintenance
Solved Stop folder creation Software
Can I disable the recycle bin delete confirmation? General Discussion

Our Sites

Site Links

About Us

Find 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 10:14 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33