Sysinternals Homepage
Forum Home Forum Home > Sysinternals Utilities > Miscellaneous Utilities
  New Posts New Posts RSS Feed - Replacing del with sdelete
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Replacing del with sdelete

 Post Reply Post Reply
Author
Message
aboutblank View Drop Down
Newbie
Newbie


Joined: 16 June 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote aboutblank Quote  Post ReplyReply Direct Link To This Post Topic: Replacing del with sdelete
    Posted: 16 June 2006 at 3:48pm
Hello everyone!

I'm interested in replacing the windows delete function with sdelete. This is a lot more difficult then it sounds because there is no del.exe. I don't quite understand where the actual code for del is located. I also can't find any pointers to it in the shell registry or elsewhere.

Basically, I still want a recycle bin, but when I either force delete (shift + del) or empty the recycle bin, I want those files to be erased using sdelete.

Putting sdelete as del.exe in system32 folder doesn't work either. using 'del' from command prompt still points to the windows one.

Any ideas?
Back to Top
Karlchen View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 June 2005
Location: Germany
Status: Offline
Points: 5126
Post Options Post Options   Thanks (0) Thanks(0)   Quote Karlchen Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2006 at 5:56pm
Good evening, aboutblank.

The del command is an internal command of cmd.exe which is the command prompt of Windows.

There is no del.exe anywhere on a fresh Windows installation. Explorer calls some Windows API function in order to delete a file or a folder.

Please have a look at this thread titled My handy sdelete scripts.
In this thread you will find templates you can use to create your own sdelete.bat (script) and you will find tips on how to include such an sdelete.bat in the Explorer contect menu.
This should achieve much of what you are trying to do.

Kind regards,
Karl

Back to Top
aboutblank View Drop Down
Newbie
Newbie


Joined: 16 June 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote aboutblank Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2006 at 8:45pm
Great. Not as clean as I would REALLY like it, but it is a lot easier then command prompting it. So, thanks a bunch.

Another note: What's up with forum searching? I searched for "sdelete" in topic subjects and nothing shows up.
Back to Top
Karlchen View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 June 2005
Location: Germany
Status: Offline
Points: 5126
Post Options Post Options   Thanks (0) Thanks(0)   Quote Karlchen Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2006 at 5:09am
Hi, aboutblank.

Quote Great. Not as clean as I would REALLY like it, but it is a lot easier then command prompting it.

Well, if any delete action used sdelete automatically, this would very likely slow down your system drastically, because sdelete requires many more writing operations than simply moving a folder entry to the recylce bin folder and Windows itself plus your applications create and delete quite a few temporary files automatically.

Quote What's up with forum searching? I searched for "sdelete" in topic subjects and nothing shows up.

Confirmed.
Searching for "sdelete" either in the topic subjects or in the message bodies did not yield any results, which of course, is incorrect.
No matter, if I searched only the "Miscellaneous Utilities" forum or "All forums".
This gives a hint why I did not manage to find a particular thread about Process Explorer, no matter which search string I entered. (I know the thing I was looking for has been discussed.)
Cannot tell you if it is a temporary forum problem like a corrupted search index file or some software "crying" for a reboot.

Karl

Edited by Karlchen - 18 June 2006 at 5:19am
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down