Windows 10: Replace delete action

Page 1 of 2 12 LastLast
  1.    29 Mar 2018 #1

    Replace delete action


    Greetings,
    is there any way to replace the default action performed when i press the del key (or rightclick > delete) within Explorer process? (maybe via registry edit?)

    Like instead of moving to recycle bin i whish to call an executable with that particular file as argument

    Action to be performed:
    C:\stuff\WipeFile.exe "%cd%\[filename]"
      My ComputerSystem Spec

  2.   My ComputerSystem Spec

  3. Berton's Avatar
    Posts : 5,392
    Win10 Home and Pro, Win10 Insider Preview, WinXP Home Premium, Linux Mint
       29 Mar 2018 #3

    Historically, since Win95 one has been able to hold down the Shift key while pressing/clicking Del/Delete to bypass the Recycle Bin but that removes the chance to recover a file unless using third-party software for the purpose.
      My ComputerSystem Spec

  4. Bree's Avatar
    Posts : 8,809
    10 Home x64 (1809) (10 Pro on 2nd pc)
       29 Mar 2018 #4

    The OP doesn't just want to bypass the recycle bin, they want to run an executable that (judging by its name) would secure-wipe the selected file. I would suggest adding it as a custom action on the right-click 'Send to' menu.

    Just create a shortcut to the WipeFile.exe in %AppData%\Microsoft\Windows\SendTo

    This will run WipeFile.exe and pass the full path to the selected file as an argument to WipeFile.exe.

    Barnack said: View Post
    Action to be performed:
    C:\stuff\WipeFile.exe "%cd%\[filename]"
    What exactly is your %cd% bit supposed to do?
      My ComputersSystem Spec

  5.    29 Mar 2018 #5

    Bree said: View Post
    The OP doesn't just want to bypass the recycle bin, they want to run an executable that (judging by its name) would secure-wipe the selected file. I would suggest adding it as a custom action on the right-click 'Send to' menu.

    Just create a shortcut to the WipeFile.exe in %AppData%\Microsoft\Windows\SendTo

    This will run WipeFile.exe and pass the full path to the selected file as an argument to WipeFile.exe.



    What exactly is your %cd% bit supposed to do?
    Well since i already made a batch with a custom del command i just copy pasted without noticing, it was to get the full path of the file because the program i'm using crashes if the argument doesn't have absolute path.
      My ComputerSystem Spec

  6.    29 Mar 2018 #6

    Berton said: View Post
    Historically, since Win95 one has been able to hold down the Shift key while pressing/clicking Del/Delete to bypass the Recycle Bin but that removes the chance to recover a file unless using third-party software for the purpose.
    Wiping a file isn't just deletion. A wiped file ideally cannot be restored.
      My ComputerSystem Spec

  7. Bree's Avatar
    Posts : 8,809
    10 Home x64 (1809) (10 Pro on 2nd pc)
       29 Mar 2018 #7

    Barnack said: View Post
    Well since i already made a batch with a custom del command i just copy pasted without noticing, it was to get the full path of the file because the program i'm using crashes if the argument doesn't have absolute path.
    Well, then it should have no problem if you use the 'Send to' menu as I suggested. Windows will provide the full path and filename as an argument to your program.
      My ComputersSystem Spec

  8.    30 Mar 2018 #8

    Bree said: View Post
    Well, then it should have no problem if you use the 'Send to' menu as I suggested. Windows will provide the full path and filename as an argument to your program.
    That's convinient, didn't know; thanks!
      My ComputerSystem Spec

  9. Bree's Avatar
    Posts : 8,809
    10 Home x64 (1809) (10 Pro on 2nd pc)
       30 Mar 2018 #9

    Yes, you can test that for yourself. Just copy and paste these commands into a ShowMe.bat file on your Desktop. Then move it into %AppData%\Microsoft\Windows\SendTo
    (you don't have permission to create or edit files there, you can only create new shortcuts).

    @ECHO OFF
    ECHO The file is: %1
    PAUSE
      My ComputersSystem Spec

  10.    04 Apr 2018 #10

    Perfect, it actually worked as intended. Next step: coding my own file wiper to work as i want it to, but that's a matter for another forum xD
    Thanks Bree!
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
This started with me trying to install Mozilla Thunderbird, but I quickly came to the belief that I'm sure it's not the installer that's causing an issue. I am running Windows 10 Pro and have administrator rights (two users on the computer, both...
Replace a 1TB HDD with a 250 GB SSD in Installation and Upgrade
HP p6716f Win10 HP (x64) desktop 1 TB hard drive (920 GB free) needs to be replaced. --- It appears to me there is only 80GB in use. Is that correct? Id like to replace it with an SSD: I suspect 250 GB would be more than ample size. I've read...
Action Center on my Win 10 64-bit PC sometimes works correctly and posts messages when an event occurs, e.g. an email being delivered or a USB stick being removed from a port. At other times though, the messages may not be displayed until 10 - 60...
replace motherboard: what happens? in Drivers and Hardware
If replaced original Foxconn N15235 motherboard (2007): chipset P4M890 Southbridge VT8237A CPU quadcore Q6600 2.4 GHz (socket LGA 775) with this one: Asus P5KPL-AM rev. 1.02g
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 20:00.
Find Us