6

Since Windows XP or before, you are able to force delete a file by holding down shift while pressing delete.

For some time now I've noticed if you select a LARGE number of files (e.g. 20k) or so, shift-delete does not force delete - instead it presents the option to send to recycle bin in the same way as if you had just pressed delete.

In trying to consistently reproduce this error I have found that it is not based on a pure threshold. Sometimes I am able to properly shift delete 10k files, sometimes it prompts me to recycle 5k.

It makes me suspect that something asynchronous is going on in the background but I can't really speculate as to what.

The short and sweet of it is, is there a way I can consistently shift-delete a large number of files?

Running W7 64-bit for what it's worth. I think i experienced this in XP as well but can't say for certain.

1
  • +1 for the most interesting question I've yet seen on this site!
    – evamvid
    Mar 11, 2014 at 1:33

2 Answers 2

11

I've just made 21,000 test files and tried.

  • If I hold shift, press delete, let go of both keys, there's a pause and then it prompts to recycle.

  • If I hold shift, press delete, let go of delete, but keep holding shift until the popup appears, it prompts to permanently delete.

This is repeatable.

I guess it's scanning the files first, then checking if shift is pressed, and there's a rough cutoff where scanning the files takes longer than a short shift press; so keep holding shift until the popup appears. Does that happen the same for you?

# PowerShell code to create 20,000 test files
foreach ($i in 1..20000) { echo hi > "$i.txt" }

rem command prompt code to create 20,000 test files
for /L %i in (1,1,20000) do @echo hi > %i.txt
6
  • wow - embarassed I did not think of this. Thanks!
    – fostandy
    Mar 11, 2014 at 3:43
  • @fostandy just curious, what are you doing that you regularly need to delete thousands of files? Mar 11, 2014 at 17:35
  • Testing and developing some utilities that generate thousands of files :) As I know I don't need them I want to delete them outright. If you're curious about the specific nature of the files, each represents a 3D solid of geological (mining) data.
    – fostandy
    Mar 13, 2014 at 7:06
  • Yeah, gotta hold shift until the dialog pops up.
    – Bigbio2002
    Mar 14, 2014 at 20:21
  • Microsoft working backwards as usual. Thanks for this, I wouldn't have thought to try it out. Jul 3, 2014 at 11:57
-2

This behavior occurs if the NUM LOCK key is activated and you press the DEL key in the numeric keypad while holding down the SHIFT key.

Resolution: Turn off the NUM LOCK key, or use the DEL key that is not in the numeric keypad.

1
  • This assumes that the NUM LOCK key is being used - the OP does not mention that it is used.
    – suspectus
    Sep 11, 2015 at 13:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .