Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - Permanently Delete - Add to Context Menu

 
06-25-2011   #29
Brink


Windows 7 Ultimate x64 SP1
 
 

Permanently Delete - Add to Context Menu

How to Add "Permanently Delete" to the Context Menu of Files and Folders

...


Last edited by Brink; 04-12-2012 at 12:03 PM..
My System SpecsSystem Spec
10-05-2011   #30
Britton30


Windows 7 Ultimate X86 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
10-05-2011   #31
Brink


Windows 7 Ultimate x64 SP1
 
 


Yeah, it seems to be either a bug or by design of SDelete.
My System SpecsSystem Spec
11-18-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
11-18-2011   #33
Brink


Windows 7 Ultimate x64 SP1
 
 


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
.


01-04-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
01-04-2012   #35
Brink


Windows 7 Ultimate x64 SP1
 
 


You're most welcome Emarell, and welcome to Seven Forums.
My System SpecsSystem Spec
02-12-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
02-12-2012   #37
Brink


Windows 7 Ultimate x64 SP1
 
 


Hello Drkh,

Yes, that would be normal.
My System SpecsSystem Spec
02-13-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
02-13-2012   #39
Brink


Windows 7 Ultimate x64 SP1
 
 


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 problems?



Tutorial Tools



Similar Threads for: Permanently Delete - Add to Context Menu
Windows 7 Tutorial Category
Solved Unable to delete EDIT item in context menu Customization
Permanently Delete Temporary Software
How to permanently delete a service. General Discussion
I want, delete background in context menu Customization
delete invalid context menu heading General Discussion


All times are GMT -5. The time now is 01:33 AM.



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
  

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