New
#30
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:
3) create a file in notepad named erase_install.reg, 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
4) double click on the file erase_install.reg that you created, confirm to add to the registry.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\" "
5) right click any file or folder then click Erase.
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. :)
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.
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?
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"
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.