Wipe files using sdelete ?
Moderators: white, Hacker, petermad, Stefan2
Not patient, but ---
2karlchen
Hi Karl !
• I'm not a patient guy really… Just UV-Pro >> Search %S >> Search Next button ++++ down to the last found…
VG
Claude
Clo
Hi Karl !
• I'm not a patient guy really… Just UV-Pro >> Search %S >> Search Next button ++++ down to the last found…
VG
Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
[OT] RE: Not patient, but ---
Hi, Clo.
You are right and I am a lazybones.
Even using the internal lister, setting it to do a case-sensitive search and searching for "%S" I had to press F3 only 5 times. Latest history.txt.
Cheers,
Karl
You are right and I am a lazybones.
Even using the internal lister, setting it to do a case-sensitive search and searching for "%S" I had to press F3 only 5 times. Latest history.txt.
Cheers,
Karl
Hi,
I run on Vista Home Premium 32bit and have one little problem: I called the batch wipe.cmd, when I try to get it running of the Totalcmd dir. When I put wipe.cmd into C:\, and it works without any problem, but I don't want the batchfile in C:\.
I tried everythink mentioned here, but it only works in the combo with wipe.cmd in C:\, sdelete.exe can be everywhere.
I run on Vista Home Premium 32bit and have one little problem: I called the batch wipe.cmd, when I try to get it running of the Totalcmd dir. When I put wipe.cmd into C:\, and it works without any problem, but I don't want the batchfile in C:\.
I tried everythink mentioned here, but it only works in the combo with wipe.cmd in C:\, sdelete.exe can be everywhere.
#153491 - Personal Licence
"Ich geh kaputt, wem darf ich was mitbringen?"
"Ich bin nicht links, ich bin nicht rechts, ich bin unten durch."
"Ich geh kaputt, wem darf ich was mitbringen?"
"Ich bin nicht links, ich bin nicht rechts, ich bin unten durch."
Hello, trininja.
jsledgers reported exactly the same phenomenon 8 weeks ago.
We never got to the bottom of this, because no error messages have ever been posted which could have given any hint as to what might have been wrong.
Explanation:
sdel.cmd or wipe.cmd is a script which calls a console programme, sdelete.exe. Hence, either sdelete or cmd.exe (which executes the script sdel.cmd / wipe.cmd) must display some error message in case they fail. As long as nobody posts such an error message chances are low that the problem will ever be solved.
Kind regards,
Karl
jsledgers reported exactly the same phenomenon 8 weeks ago.
We never got to the bottom of this, because no error messages have ever been posted which could have given any hint as to what might have been wrong.
Explanation:
sdel.cmd or wipe.cmd is a script which calls a console programme, sdelete.exe. Hence, either sdelete or cmd.exe (which executes the script sdel.cmd / wipe.cmd) must display some error message in case they fail. As long as nobody posts such an error message chances are low that the problem will ever be solved.
Kind regards,
Karl
Well, what I found out is: sdelete.exe wasn't found is the error message, wenn sdelete.exe is in c:\Program Files\totalcmd\ or any deeper directory within the TC folder, the wipe.cmd could be anywhere in the system. I managed to get this message via CMD.
But I found another script that can start sdelete.exe when it is in the TC Folder. I found it over at the Sysinternals forums and did some changes:
The icalcs line is commented out, because I have to rewrite this line. There are some syntax errors with the original one and I want some different switches and infos.
When this .cmd is in the TC Folder or TC\Tools\Eraser, it won't work and quits with no message. Trying to find the error is little bit complicated, because when I launch the CMD and go into C:\Program Files\totalcmd\Tools\Eraser and start the wipe.cmd with "wipe.cmd C:\test.log" it works, only when I use it as a button in TC, it won't work. Any ideas how I can get the error? The pause command doesn't help.
But I found another script that can start sdelete.exe when it is in the TC Folder. I found it over at the Sysinternals forums and did some changes:
Code: Select all
@echo off
:Sets owner to the current loged in User
:FOR %%F IN (%*) DO ECHO Y| icacls %%F /t /c /grant "%username%":f
:Set proper attributes for directories
FOR %%F IN (%*) DO attrib -h -s -r -a %%F /S /D
:Set proper attributes for files
FOR %%F IN (%*) DO attrib -h -s -r -a %%F\*.* /S /D
:3-Pass Deletion
FOR %%F IN (%*) DO "C:\Program Files\totalcmd\Tools\Eraser\sdelete.exe" -p 3 -s %%F
PAUSE
EXIT /b 0
When this .cmd is in the TC Folder or TC\Tools\Eraser, it won't work and quits with no message. Trying to find the error is little bit complicated, because when I launch the CMD and go into C:\Program Files\totalcmd\Tools\Eraser and start the wipe.cmd with "wipe.cmd C:\test.log" it works, only when I use it as a button in TC, it won't work. Any ideas how I can get the error? The pause command doesn't help.
#153491 - Personal Licence
"Ich geh kaputt, wem darf ich was mitbringen?"
"Ich bin nicht links, ich bin nicht rechts, ich bin unten durch."
"Ich geh kaputt, wem darf ich was mitbringen?"
"Ich bin nicht links, ich bin nicht rechts, ich bin unten durch."
Hello, trininja.
This in turn suggests that
Karl
This suggests that either of the following reasons applied:sdelete.exe wasn't found is the error message
- sdelete.exe was launched without prefixing the fully qualified foldername, yet sdelete.exe could not be found searching the folders listed in the %PATH% variable.
- sdelete.exe was launched like this C:\Path\to\sdelete.exe. The path specification enclosed a space character, but was not enclosed in double quotes.
- sdelete.exe was launched like this C:\Path\to\sdelete.exe. But the given path specification was simply incorrect.
This seems to suggest that the script itself is all right and is suitable to its job.when I launch the CMD and go into C:\Program Files\totalcmd\Tools\Eraser and start the wipe.cmd with "wipe.cmd C:\test.log" it works,
Does this mean that even the pause command inside the script does not display its notorious "Press any key to continue ..."? If even this message is not displayed and if you do not have to press a key, then the script does not get launched at all.When this .cmd is in the TC Folder or TC\Tools\Eraser, it won't work and quits with no message.
This in turn suggests that
- Something may be wrong with the button configuration which you use to launch wipe.cmd.
One way of finding out has been explained here: 4th idea. The important thing is to copy and paste the button commandline into a cmd.exe window and find out whether wipe.cmd will be launched. - If the above test proves that the commandline to launch wipe.cmd is correct, then it might be that *.cmd is no longer associated with cmd.exe on your Windows system.
The regkey HKCR\.cmd should specify a default value of "cmdfile".
The regkey HKCR\cmdfile should have the following subkey: HKCR\cmdfile\shell\open\command. The default value should be "%1" %*. - You may also locate wipe.cmd and double click it. It should not do more than display the notorious pause message "Press any key to continue ..." (You migh comment out any destructive commands before double clicking wipe.cmd, just to be sure it will not wipe anything.)
Karl
To 1: Path was given full like int he other Scripted I used, I used the "" everywhere I should.karlchen wrote:Hello, trininja.
This suggests that either of the following reasons applied:sdelete.exe wasn't found is the error message
- sdelete.exe was launched without prefixing the fully qualified foldername, yet sdelete.exe could not be found searching the folders listed in the %PATH% variable.
- sdelete.exe was launched like this C:\Path\to\sdelete.exe. The path specification enclosed a space character, but was not enclosed in double quotes.
- sdelete.exe was launched like this C:\Path\to\sdelete.exe. But the given path specification was simply incorrect.
To 2: "" where given.
To 3: Checked several times, as you can see, I'm from germany, so I tried C:\Programme and C:\Program Files (Windows Vista) redirects C:\Programme to C:\Program Files.
Right, thats what is happening.About the other wipe script which you switched to:This seems to suggest that the script itself is all right and is suitable to its job.when I launch the CMD and go into C:\Program Files\totalcmd\Tools\Eraser and start the wipe.cmd with "wipe.cmd C:\test.log" it works,Does this mean that even the pause command inside the script does not display its notorious "Press any key to continue ..."? If even this message is not displayed and if you do not have to press a key, then the script does not get launched at all.When this .cmd is in the TC Folder or TC\Tools\Eraser, it won't work and quits with no message.
The Registry values are all given and work, when I use the command line from TC button in CMD, it gives me the Press any key..., when I start the wipe.cmd with a doubleclick, the Press any key... pops up.This in turn suggests thatKind regards,
- Something may be wrong with the button configuration which you use to launch wipe.cmd.
One way of finding out has been explained here: 4th idea. The important thing is to copy and paste the button commandline into a cmd.exe window and find out whether wipe.cmd will be launched.- If the above test proves that the commandline to launch wipe.cmd is correct, then it might be that *.cmd is no longer associated with cmd.exe on your Windows system.
The regkey HKCR\.cmd should specify a default value of "cmdfile".
The regkey HKCR\cmdfile should have the following subkey: HKCR\cmdfile\shell\open\command. The default value should be "%1" %*.- You may also locate wipe.cmd and double click it. It should not do more than display the notorious pause message "Press any key to continue ..." (You migh comment out any destructive commands before double clicking wipe.cmd, just to be sure it will not wipe anything.)
Karl
So, now I have to use the wipe.cmd in C:\Batch for my purpose, better than on C:\ but it is no solution in my eyes. Maybe you got another idea.
Kind regards,
Michael
#153491 - Personal Licence
"Ich geh kaputt, wem darf ich was mitbringen?"
"Ich bin nicht links, ich bin nicht rechts, ich bin unten durch."
"Ich geh kaputt, wem darf ich was mitbringen?"
"Ich bin nicht links, ich bin nicht rechts, ich bin unten durch."
Hello, Michael.
I know that we are both from Germany. Funny thing that we are discussing this issue in English.
Well, well, the script is fine. The T.C. button commandline is fine. Double quotes are fine.
Seems as if the problem occurs only in case the batch file is located inside a subfolder of "%programfiles%".
So it might be Vista specific, because I cannot reproduce the problem on Windows XP e.g. Yet, on Windows XP, there is either "C:\Program Files" if you are on an English version or "C:\Programme" if you are on a German version. Only on Vista we have got both, "C:\Program Files", the real folder, and "C:\Programme", the symbolic link (or what else is it? Cannot check right now, because I am back on XP at the moment.)
Looks as if I will have to repeat my tests on Vista before I can post another more or less clever idea.
Cheers,
Karl
I know that we are both from Germany. Funny thing that we are discussing this issue in English.
Well, well, the script is fine. The T.C. button commandline is fine. Double quotes are fine.
Seems as if the problem occurs only in case the batch file is located inside a subfolder of "%programfiles%".
So it might be Vista specific, because I cannot reproduce the problem on Windows XP e.g. Yet, on Windows XP, there is either "C:\Program Files" if you are on an English version or "C:\Programme" if you are on a German version. Only on Vista we have got both, "C:\Program Files", the real folder, and "C:\Programme", the symbolic link (or what else is it? Cannot check right now, because I am back on XP at the moment.)
Looks as if I will have to repeat my tests on Vista before I can post another more or less clever idea.
Cheers,
Karl