n8chavez
April 7th, 2009, 04:05 AM
I'm trying to add the ability to use sdelete within the context menu to erase files and/or folders securely. I know about the alternatives, but I admittedly like command line applications. I might need a little help in doing so because nothing I have tried as worked.
I have created the following registry entry, which then points to the below bat.
{QUOTE-> Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Secure Delete]
@=""
[HKEY_CLASSES_ROOT\*\shell\Secure Delete\command]
@="C:\\windows\\sdelete.bat"
<-QUOTE}
sdelete.bat
{QUOTE-> @echo off
:START
if "%~f1"=="" (
echo No more args given. Done.
pause
exit /b 0
)
:WORK
attrib -h -s -r -a "%1" /S /D
"C:\windows\sdelete.exe" -p 3 -s "%1"
:NEXTARG
shift
goto START <-QUOTE}
I cannot figure out why this does not work. When I execute the script I'm told that sdelete is using an invalid argument switch. I can only guess that it is referring to the "%1". But I believe that to be correct.
Any ideas?
I have created the following registry entry, which then points to the below bat.
{QUOTE-> Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Secure Delete]
@=""
[HKEY_CLASSES_ROOT\*\shell\Secure Delete\command]
@="C:\\windows\\sdelete.bat"
<-QUOTE}
sdelete.bat
{QUOTE-> @echo off
:START
if "%~f1"=="" (
echo No more args given. Done.
pause
exit /b 0
)
:WORK
attrib -h -s -r -a "%1" /S /D
"C:\windows\sdelete.exe" -p 3 -s "%1"
:NEXTARG
shift
goto START <-QUOTE}
I cannot figure out why this does not work. When I execute the script I'm told that sdelete is using an invalid argument switch. I can only guess that it is referring to the "%1". But I believe that to be correct.
Any ideas?