Author: BehroMoto
Subject: Help a noob with a batch file?
Posted: 15 December 2013 at 12:22am
I got this batch file years ago on a Sysinternals thread and modified it slightly.
It goes in my "SendTo" folder, and runs sDelete on a file that I right-click > sendto upon.
It's worked on my Windows 7 (32 bit) installs until just now. All I get it to do now is flash up a command dialog box on the screen which immediately disappears. the file is NOT deleted.
sDelete.exe is in my C:\Windows\System32 directory
this batch file is in this location: C:\Users\Mike\AppData\Roaming\Microsoft\Windows\SendTo
Does anyone see anything wrong with this batch file?
Thanks,
Mike
@echo off
:START
if "%~f1"=="" (
echo No more args given. Done.
exit /b 0
)
:WORK
ECHO Y| cacls %1 /T /C /G Administrators:F
attrib -h -s -r -a %1 /S /D
attrib -h -s -r -a %1\*.* /S /D
sdelete -p 3 -s -q %1
:NEXTARG
shift
goto START
Edited by BehroMoto - 17 hours 35 minutes ago at 12:25am
Subject: Help a noob with a batch file?
Posted: 15 December 2013 at 12:22am
I got this batch file years ago on a Sysinternals thread and modified it slightly.
It goes in my "SendTo" folder, and runs sDelete on a file that I right-click > sendto upon.
It's worked on my Windows 7 (32 bit) installs until just now. All I get it to do now is flash up a command dialog box on the screen which immediately disappears. the file is NOT deleted.
sDelete.exe is in my C:\Windows\System32 directory
this batch file is in this location: C:\Users\Mike\AppData\Roaming\Microsoft\Windows\SendTo
Does anyone see anything wrong with this batch file?
Thanks,
Mike
@echo off
:START
if "%~f1"=="" (
echo No more args given. Done.
exit /b 0
)
:WORK
ECHO Y| cacls %1 /T /C /G Administrators:F
attrib -h -s -r -a %1 /S /D
attrib -h -s -r -a %1\*.* /S /D
sdelete -p 3 -s -q %1
:NEXTARG
shift
goto START
Edited by BehroMoto - 17 hours 35 minutes ago at 12:25am