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: Permanently Delete - Add to Context Menu

05 Oct 2011   #30
Britton30
Microsoft MVP

Windows 7 Ultimate X64 SP1
 
 

Quote   Quote: Originally Posted by grindage View Post
is there anyway to have it remove the folder as well.
i click delete perm on a folder and it just deletes everything in the folder but leaves directory there.
Same happens to me, it may be a bug. I can delete the folder one of two ways, run Permanently Delete again or by using Refresh. One will always work.


My System SpecsSystem Spec
05 Oct 2011   #31
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Yeah, it seems to be either a bug or by design of SDelete.
My System SpecsSystem Spec
18 Nov 2011   #32
etb

Windows 7 Ultimate x64
 
 
my fix, feel free to use, re-post or re-package

this doesn't use 3rd party tools, and deletes folders or files.

What it does:adds silent delete function that bypasses the recycle bin to the right click menu for any file or folder under the name "Erase"

tested on windows 7 ultimate 64bit

1) create a folder named c:/erase

2) create a file in notepad named erase.vbs inside c:/erase folder, input contents below and save:
Code:
on error resume next
sFileSpec = Wscript.Arguments.Item(0)
DeleteAFolder(sFileSpec)
DeleteAFile(sFileSpec)

Sub DeleteAFile(filespec)
Dim fso
Set fso = CreateObject( "Scripting.FileSystemObject" )
If (fso.FileExists(fileSpec)) Then fso.DeleteFile(filespec)
End Sub

Sub DeleteAFolder(filespec)
Dim fso
Set fso = CreateObject( "Scripting.FileSystemObject" )
If (fso.FolderExists(filespec)) Then fso.DeleteFolder(filespec)
End Sub
3) create a file in notepad named erase_install.reg, input contents below and save:
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\Shell\Erase\Command]
@="wscript C:\\erase\\erase.vbs \"%1\" "

[HKEY_CLASSES_ROOT\Directory\shell\Erase\Command]
@="wscript C:\\erase\\erase.vbs \"%1\" "
4) double click on the file erase_install.reg that you created, confirm to add to the registry.

5) right click any file or folder then click Erase.
My System SpecsSystem Spec
18 Nov 2011   #33
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Hello etb, and welcome to Seven Forums.

Thank you for providing this alternative option. I have modified it just a bit for the name and icon, then added it as OPTION TWO in the tutorial.
My System SpecsSystem Spec
.


04 Jan 2012   #34
emarell

Vista Home Premium 32bit
 
 

re: OPTION TWO
Excellent! Keyboard-phobic and so very tired of Shift-Delete-ing, I went looking for a way to do exactly this, delete one file permanently without using a shredder. Though I have Vista, this method works perfectly. Thanks.
My System SpecsSystem Spec
04 Jan 2012   #35
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

You're most welcome Emarell, and welcome to Seven Forums.
My System SpecsSystem Spec
12 Feb 2012   #36
drkh

Windows 7 Home Premium x64 SP1
 
 

When the "Permanently delete" item of the context menu of a shortcut is clicked on, it's the target of the shortcut that gets deleted, not the shortcut itself.

Is that normal?
My System SpecsSystem Spec
12 Feb 2012   #37
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Hello Drkh,

Yes, that would be normal.
My System SpecsSystem Spec
13 Feb 2012   #38
tomaskucinskas

Windows 7 Ultimate x64
 
 

Hello,

I am using this (without a Secure Erase) with Classic Shell (custom command) and its working well with single file, but no way with multiple files selected. What I am doing wrong?

Command: wscript.exe "G:\....\Delete.vbs" "%2"
My System SpecsSystem Spec
13 Feb 2012   #39
Brink
Microsoft MVP

64-bit Windows 10 build 10159
 
 

Hello Tomas,

How many items do you have selected when you are trying to permanently delete them?

If over 15 items, then see the yellow TIP box at the top of the tutorial to see if that may be the issue.

I also used %1 instead of %2 in the command.
My System SpecsSystem Spec
Comment

 Permanently Delete - Add to Context Menu




Tutorial Tools





Similar help and support threads
Windows 7 Tutorial Category
Making another delete menu in the context menu?
I use 64bit windows 7. I want to make another delete menu in the context menu(right click menu). Its function should be exactly the same as preexsiting delete, but its name is 'xdelete'. So one can press X (instead of D) to delete files or folders. I found a helpful document:...
Customization
Delete context menu item
This is kind of baffling to me, but I can't find where to delete a context menu item that appeared when I installed some program on my HTPC (Windows 7 Ultimate x64). It's not there when I right-click on a file or on a folder. It's there when I right-click the desktop. ...
General Discussion
Cant delete programs from context menu
I AM AT KEY HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers WHICH SHOW THIS LIST>>>> i go into the list and delete the iteams i dont want on my contect menu and after restart they are still there. can some one help i have tryed all these reg keys and nuthing seem's to work. someone please point...
Customization
Delete specific context menu entries
Hi all, I have noticed that there is some very annoying context menu entries when you select to rename text within a filename. For example, right to left reading order and open IME. I was wondering how I could remove these as I really dont want them there. Attachement included to show ...
Customization
I want, delete background in context menu
is that posible????? Thanks
Customization
delete invalid context menu heading
Hi everyone, i am new to the forum and looking for a bit of help. when i right click on the recyle bin in windows 7, i get an option to shred with pc optimizer pro which is a programme i no longer have on my pc. Can anyone tell me how i get rid of this from the context menu? thanks in advance...
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 11:36.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App